Jan 28, 2024 7:40 pm
How to change the background color of the TinyMCE editor?
33 Replies
Jan 29, 2024 4:48 am
Example
<script type="text/javascript"> jQuery(window).load(function() { tinyMCE.activeEditor.dom.addStyle('body{background-color:#000000 !important; color:#dddddd !important;}'); }); </script>
Jan 29, 2024 12:33 pm
Additionally, I only wish to modify the background-color on the dark version of the forum.
Is it feasible to make this change using CSS?
Jan 29, 2024 2:34 pm
I am interested in the same modification. Being able to change the background color based on light or dark mode.
Jan 29, 2024 2:49 pm
Is it feasible to make this change using CSS?
If you use WP Dark Mode, you have new CSS classes.
e.g. wp-dark-mode, wp-dark-mode-ignore, --wp-dark-mode-inline, etc.
you can check with the browser developer tools, which will then be used for the editor.
I don't use the dark mode plugin, so I can't help you.
just as an example, probably not working
<script type="text/javascript"> jQuery(window).load(function() { tinyMCE.activeEditor.dom.addStyle('.wp-dark-mode body{background-color:#000000 !important; color:#dddddd !important;}'); }); </script>
Page 1 / 3
Next