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

how to auto select color after editor loaded

1 Answer 48 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Big Q
Top achievements
Rank 1
Big Q asked on 25 Aug 2012, 09:28 AM
hi telerik,
    I want a specific color of the forecolor dropdown can be selected by client code when the radeditor load, and I have the same porblem with the font-size dropdown , how should I do? thanks

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 27 Aug 2012, 12:36 PM
Hello,

You can attach to the OnClientLoad event and fire the ForeColor and FontSize commands:

<telerik:RadEditor ID="RadEditor1" runat="server" OnClientLoad="OnClientLoad"></telerik:RadEditor>
    <script type="text/javascript">
        function OnClientLoad(editor) {
            setTimeout(function () {
                editor.fire("FontSize", { value: "3" });
                editor.fire('ForeColor', { value: "orange" });
            }, 100);
        }
</script>


Greetings,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
Big Q
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or