htmlcssckeditorfckeditor

Change background of ckeditor?


How do I change the background colour of CKEditor, where the user types the text? I need to do this dynamically but I cant find the element that needs to change. ANy idea of how to target it?


Solution

  • You can try with:

    CKEDITOR.instances.editor1.document.getBody().setStyle('background-color', 'red');
    

    Where CKEDITOR.instances.editor1 is an instance of editor - you can test this e.g. here: http://ckeditor.com/demo