javascript - WordPress: Change admin wp_editor background color? -


i'd user able dynamically set background color of wp_editor on edit page screen.

for example, i'm using iris color picker let user set background color page.

i'd color applied visual editor editing, see looks like.

as test, tried modifying editor's background color calling:

tinymce.init({     selector: 'textarea',     content_style: "div { background-color: #000000; }", }); 

it didn't work.

turns out needed this:

tinymce.get(0).getbody().style.backgroundcolor = color; 

i'm using wordpress' built-in iris color picker. here's full call:

$('.colorpicker').iris({     change: function(event,ui){         tinymce.get(0).getbody().style.backgroundcolor = ui.color.tostring();     } });