改变ckeditor的背景?

pan*_*hro 2 html css fckeditor ckeditor

如何更改CKEditor的背景颜色,用户在哪里键入文本?我需要动态地执行此操作,但我无法找到需要更改的元素.关于如何定位它的任何想法?

Rei*_*mar 5

您可以尝试:

CKEDITOR.instances.editor1.document.getBody().setStyle('background-color', 'red');
Run Code Online (Sandbox Code Playgroud)

CKEDITOR.instances.editor1编辑器的实例在哪里- 您可以在此处测试:http://ckeditor.com/demo