How can I change editor BGcolor after it has been loaded (displayed).
I got a tip from one that the bgcolor is set using the body tag for the editor and that I could change the style for the body to change the color when it loads first time.
Is it possible to change background color after it has been displayed without reloading page, by using a method/property of the editor......
I got a tip from one that the bgcolor is set using the body tag for the editor and that I could change the style for the body to change the color when it loads first time.
Is it possible to change background color after it has been displayed without reloading page, by using a method/property of the editor......
RE: How can I dynamically change editor BGcol
Here is the function:
<script type="text/javascript">
<!--
function setEditorAreaColor(instanceName,daColor) {
editor_frame = document.getElementById(instanceName+'___Frame');
if (editor_frame!=null) {
editor_source = editor_frame.contentWindow.document.getElementById('eEditorArea');
if (editor_source!=null) {
editor_source.contentWindow.document.body.style.backgroundColor=daColor;
return true;
} else { return false; }
} else { return false; }
}
//-->
</script>
Then this, but replace "textEditor" with the name of your editor instance (Works with IE and FireFox):
<select id="aColor"><option value="#00FF00">Green</option><option value="#0000FF">Blue</option><option value="#FF0000">Red</option></select>
<input type="button" onclick="setEditorAreaColor('textEditor',document.getElementById('aColor').value);" value="Update EditorArea Color" />
If you wander under my bridge I'll eat you for lunch. Or a light snack, even (I could use the protein).
Best,
D'Troll
RE: How can I dynamically change editor BGcol
Will test it laiter today
No bridge to walk under here. If you still need that protein I could send you some mushrooms. They should be packed with prot....