Change background color of fckeditor / ColdFusion rich textarea

Preface: I work on a project for my office that is hosted by a third party.  Therefore, I do not have access to all the inner workings of ColdFusion.  Specifically I do not have access to the fck_editorarea.css file.

For a new form in the project I need to add a rich textarea.¬† The rich textarea will sit atop a div with a background color so I need to change the textarea’s background color to white.¬† If I can’t access fck_editorarea.css to change the style what can I do?¬† I can change it via the DOM with JavaScript.¬† For kicks I also added a border.¬† Place the following script just before the </html> tag.

<script type="text/javascript">
fckItem=document.getElementById('NEWSBODY___Frame');
// change bgcolor
fckItem.style.backgroundColor="#FFFFFF";
// add a border
fckItem.style.border="1px solid #0A0A4F";
</script>

Easy enough.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.