Hi, spent a bunch of time nogging over this one. Finally figured it out. I traced it all the way back to the Telerik.Web.UI.Editor.RadEditor.js. I'm using Q1 2009 RadControls for ASP.NET Ajax.
I was getting a "Object does not support this property or method" error when using the following script:
Hope this saves someone a few hours :)
I was getting a "Object does not support this property or method" error when using the following script:
<script type="text/javascript"> |
function OnClientLoad(editor, args) { |
editor.fire("SelectAll"); |
editor.fire("ApplyClass", { value: ".default" }); |
} |
</script> |
Figured out that it need an object with a get_value() method:
<script type="text/javascript"> |
function OnClientLoad(editor, args) { |
editor.fire("SelectAll"); |
objCssClass = new Object(); objCssClass.get_value = function() { return ".default"; } |
editor.fire("ApplyClass", objCssClass); |
} |
</script> |
Hope this saves someone a few hours :)