I was looking at (ID#943) to applying external stylesheet to the content of RadEditor in Preview mode. However, i need to change the background color in HTML mode. How do i do this. Following the same approach does not work for the HTML mode.
Thanks,
Raj
1 Answer, 1 is accepted
0
Rumen
Telerik team
answered on 11 Aug 2008, 07:32 AM
Hi Rajesh,
You can use the following code to get a reference to the content area in Html mode of RadEditor:
<script type="text/javascript">
function OnClientLoad(editor, args)
{
editor.add_modeChange(function(sender, args)
{
var mode = sender.get_mode();
if (mode == 2)
{
var htmlArea = editor.get_textArea();
htmlArea.style.backgroundColor = "red";
}
});
}
</script>
<telerik:radeditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoad">
<ImageManager ViewPaths="~/Images" UploadPaths="~/Images" />
</telerik:radeditor>
Best regards,
Rumen
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.