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

Set default align/justify

4 Answers 241 Views
Editor
This is a migrated thread and some comments may be shown as answers.
eric
Top achievements
Rank 1
eric asked on 17 Dec 2010, 01:16 AM
How can you set the default justification for the rad editor?  For some reason my editors are defaulting to no justification but I want them left justified by default.  I can't find the right property to set.


<telerik:RadEditor ID="reContent" Skin="Office2007" runat="server" EditModes="Design" >
    <Tools>
        <telerik:EditorToolGroup>
                <telerik:EditorTool Name="AjaxSpellCheck" />
                <telerik:EditorTool Name="FontName" />
                <telerik:EditorTool Name="FontSize" />
                <telerik:EditorTool Name="Bold" />
                <telerik:EditorTool Name="Italic" />
                <telerik:EditorTool Name="Underline" />
            <telerik:EditorSeparator />
                <telerik:EditorTool Name="JustifyLeft" Enabled="true" />
                <telerik:EditorTool Name="JustifyCenter" />
                <telerik:EditorTool Name="JustifyFull" />
                <telerik:EditorTool Name="JustifyRight" />
                <telerik:EditorTool Name="JustifyNone" />
                <telerik:EditorSeparator />
                <telerik:EditorTool Name="Indent" />
                <telerik:EditorTool Name="Outdent" />
                <telerik:EditorSeparator />
                 
                <telerik:EditorTool Name="InsertOrderedList" />
                <telerik:EditorTool Name="InsertUnorderedList" />
                <telerik:EditorSeparator />
                <telerik:EditorTool Name="Undo" />
                <telerik:EditorTool Name="Redo" />
        </telerik:EditorToolGroup>
    </Tools>
</telerik:RadEditor>

4 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 17 Dec 2010, 06:24 AM
Hello Eric,


The documentation describes about setting default styles for editor content. Hope this would help you.
Setting Content Area Defaults



-Shinu.
0
eric
Top achievements
Rank 1
answered on 20 Dec 2010, 10:01 PM
Thanks Shinu, I was able to use a css file to left align the text.  My other question would be, how can I programatically select the left align button in the editor?
0
Rumen
Telerik team
answered on 22 Dec 2010, 06:39 PM
Hi Eric,

You can use the fire client-side method of RadEditor, e.g.

editor.fire("JustifyLeft");

You can execute this method in the OnClientLoad event.


Greetings,
Rumen
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
eric
Top achievements
Rank 1
answered on 22 Dec 2010, 06:43 PM
Rumen,

Thanks, I'll have to go and test this out!
Tags
Editor
Asked by
eric
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
eric
Top achievements
Rank 1
Rumen
Telerik team
Share this question
or