I am using CKEditor, and would like to change the background color that by default is white (the area where the user types HTML). I would like to change it via java script.
I have tried looking up on the web for examples and have come across posts refering to the CKEDITOR.dom.element(element, ownerDocument) and using setstyle, I can not seem to figure out the correct syntax though.
*****************************************
I create the editor like this....
dvCKEditor = document.getElementById('dvCKEditor');
editor = CKEDITOR.replace('dvCKEditor', { toolbar: 'Basic1', height: '80' });
*****************************************
-----------------------------------------
Here is an example of the code I would use to change color....
function changeScrollerBackgroundColor() {
if (cmbScrollerBackgroundColor.selectedIndex == 0) {
// Change Color To '#FFFFFF';
} else if (cmbScrollerBackgroundColor.selectedIndex == 1) {
// Change Color To '#CC0000';
} else {
// Change Color To '#FFFFFF';
}
}
-----------------------------------------
I have tried looking up on the web for examples and have come across posts refering to the CKEDITOR.dom.element(element, ownerDocument) and using setstyle, I can not seem to figure out the correct syntax though.
*****************************************
I create the editor like this....
dvCKEditor = document.getElementById('dvCKEditor');
editor = CKEDITOR.replace('dvCKEditor', { toolbar: 'Basic1', height: '80' });
*****************************************
-----------------------------------------
Here is an example of the code I would use to change color....
function changeScrollerBackgroundColor() {
if (cmbScrollerBackgroundColor.selectedIndex == 0) {
// Change Color To '#FFFFFF';
} else if (cmbScrollerBackgroundColor.selectedIndex == 1) {
// Change Color To '#CC0000';
} else {
// Change Color To '#FFFFFF';
}
}
-----------------------------------------