简体   繁体   中英

How to set inline style at RadEditor control's body element

I want to set inline style at body element of Telerik's Radeditor BUT i want to do this without the radeditor css file which is the official solution.

For example i want the body of the editor to have inline font-family when editor initialized.

It should be inline style for my purposes.I use radeditor as email editor ,so the body will get through sanitization providers.

Any solution either form client-side or from Code-behind C# will help.

Thanks in advance.

Here is an example on how to get reference to the content area on the client:

<telerik:RadEditor
   ID="RadEditor1"
   OnClientLoad="OnClientLoad"
   runat="server">
</telerik:RadEditor>
...
<script type="text/javascript">
    function OnClientLoad(editor, args) {
        var style = editor.get_contentArea().style;
        style.backgroundImage = "none";
        style.backgroundColor = "black";
        style.color = "red";
        style.fontFamily = "Arial";
        style.fontSize = 15 + "px";
    }
</script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM