I found a great article on how to change the background color of CKEditor on the fly. This became a great approach when performing form validation:
Link is here, but for a quick reference, here’s how you reference it:
this.document.$.childNodes[1].childNodes[1].style.backgroundColor ='Blue';
this refers to your CKEditor Instance (CKEDITOR.instances['instanceName'] or CKEDITOR.instances.formFieldIdName)
Discussion
No comments for “CKEditor – Change the background color using JavaScript”
Post a comment
You must be logged in to post a comment.