Get/Set Editor Text

Last post 07-18-2006, 1:36 PM by Adam. 1 replies.
Sort Posts: Previous Next
  •  07-18-2006, 12:30 PM 21025

    Get/Set Editor Text

    Im having a problem grabbing the text within the CuteEditor. It seems to copy the HTML tags with the message. I can set "Editor1.EnableClientScript = False" but it loses the toolbar and looks horrible because it redraws the CuteEditor control all messed up....

    I just need to grab the plain-text message from the CuteEditor. It shouldnt be hard at all...


    How can I grab just the plain-text message? I try "strMyString = Editor1.Text" but it only gives me the rich-text message with HTML tags. Now if I set "EnableClientScript=false" it gives me the plain-text message but it creates major HTML havoc on my page and I cannot do that.

    Any suggestions?
    Thanks
    Homecity

  •  07-18-2006, 1:36 PM 21029 in reply to 21025

    Re: Get/Set Editor Text

    Homecity,

    >>How can I grab just the plain-text message?

    Please use the following properties:

    Editor.PlainText Property

    Retrieves the CuteEditor HTML content in plain text format.

    Remarks

    This property is read-only. If you want to store the document text in a database which is searchable, you can use the output of this property to create an HTML-free copy for indexing.

    Example

    string plainText = editor1.PlainText;


     

    Editor.PlainTextWithLinefeeds Property

    Retrieves the CuteEditor HTML content in plain text format and replace carriage returns with the appropriate br and p tags for breaks.

    Remarks

    This property is read-only. If you want to store the document text in a database which is searchable, you can use the output of this property to create an HTML-free copy for indexing.

    Example
     
        string plaintextwithlinefeeds = editor1.PlainTextWithLinefeeds;

     

     


    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

View as RSS news feed in XML