This is a migrated thread and some comments may be shown as answers.

[Solved] Formatting unselected text

1 Answer 65 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Jay
Top achievements
Rank 1
Jay asked on 28 Sep 2009, 05:50 PM
It seems that by default the editor works by formatting text only when it is highlited. I want to be able to format the entire text that is typed into the editor whenever a user makes a format selection,ie. when clicking bold or italics. I want the format to take place over the entire text not just what has been highlited. Is there not a mode that I can set for this control to behave this way? Thanks.
jay

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 01 Oct 2009, 09:11 AM
Hello Jay,

You can use the following code to automatically apply Bold, Italic and Underline commands to the whole content when the editor loads:

<script type="text/javascript"
function OnClientLoad(editor) 
    setTimeout(function() 
    { 
        editor.fire("SelectAll"); 
        editor.fire("Bold"); 
        editor.fire("Italic"); 
        editor.fire("Underline"); 
     }, 100); 
</script> 
<telerik:radeditor runat="server" OnClientLoad="OnClientLoad" ID="RadEditor1"
    <ImageManager ViewPaths="~/files" UploadPaths="~/files" /> 
    <Content>dasdadas</Content> 
</telerik:radeditor> 


Sincerely yours,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Editor
Asked by
Jay
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or