RadEditor in plain text mode only?

3 posts, 0 answers
  1. Troy Young
    Troy Young avatar
    12 posts
    Member since:
    Jun 2012

    Posted 10 Apr 2009 Link to this post

    Is it possible to use the RadEditor in a plain text mode only, where the content going in and out of the editor is always treated as text and never as html?  Currently, my application has a screen with a textarea element that the users use to input blocks of vbscript and perlscript commands that are saved in and out of a database and executed in other processes.  I would like to migrate to the RadEditor and take advantage of some of its features such as copy,paste,undo,redo,find,replace,font changes,etc.  But it seems that the editor always presents HTML, and I lose carriages returns, tabs, whitespace, etc when I originally load the text to display for the user.  I see the .Text property will retrieve plain text, but I would like to be able to load the data as plain text too, without it ever being converted to html.  Basically I want to use RadEditor as a text editor and not an HTML editor.  I am not seeing a way to do this, am I missing something, or is it not possible?
  2. ManniAT
    ManniAT avatar
    877 posts
    Member since:
    Nov 2003

    Posted 11 Apr 2009 Link to this post

    Hi Troy,

    I guess this post gives some kind of answer to your question.
    http://www.telerik.com/community/forums/aspnet-ajax/editor/edit-files-directly.aspx

    I found it these days because I was also searching for an "extended text editor".
    I want (like you) text file edit - and (like the other poster) CSS file edit.

    Reading the linked post I decided not to use RadEditor in this case.
    So I do two different things
    a.) for Textfiles (small ones) I use a normal textbox
    Spell is useable - and "formatting" on a textfile :)
    b.) for CSS and other specialized filetypes I implemented a download / upload scenario with RadFileExplorer
    This is OK for my customer - he uses Visual Studio Express Web for CSS - which gives "WYSIWYG" editing.

    Ah, by the way - my HTML content editing is done with RadEditor.

    HTH

    Manfred
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 13 Apr 2009 Link to this post

    Hi Troy,

    The editor is meant and designed to be used as a HTML editor, and not as textbox (the assumption being that if one needs a textbox one would use a textbox).

    Still, the editor does offer some text- and textbox- related features, such as the read-only Text property which returns editor content as pure text, for example.

    As far as setting [text] content is concerned, the link provided by Manfred is quite good and will help you in your scenario.

    In case you are looking also for more textbox-like RadEditor look II want to point your attention to the following online demo:
    http://demos.telerik.com/aspnet-ajax/editor/examples/editorastextbox/defaultcs.aspx

    Best regards,
    Tervel
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Back to Top