I tried with this code but it doesn't work:
The code above was just an example, it was clear that it wouldn't work
You are not using WP Dark Mode
You are using Darklup 😉
therefore also other CSS classes
Some examples
wpc--darklup-element, darklup--bg, darklup--bg-applie
As a guest I do not see the editor, therefore no CSS classes
You should ask the developer of Darklup for the CSS classes if you can't find them yourself.
No support from darklup, can someone help me please?
User: wpforo
Pass: wpforo
Could you please assist me in changing the background of the editor in the dark theme, following Tutrix's script?
TYVM
You're right, I wrote nonsense. Private messages are not enabled here. As soon as I get home I'll try to take a look at your forum. I hope I can help you.
As @tutrix said before, you use a different plugin and therefore the references to be recalled change..
Looking at your css I see this:
html.darklup-dark-mode-enabled #wpforo #wpforo-wrap .wpf-post-create { background: #15202b !important; }
so in theory it should become like this:
<script type="text/javascript"> jQuery(finestra).load(funzione() { tinyMCE.activeEditor.dom.addStyle('.darklup-dark-mode-enabled body{ background-color:#000000 !important; color:#dddddd !important;}'); }); </script> or <script type="text/javascript"> jQuery(finestra).load(funzione() { tinyMCE.activeEditor.dom.addStyle('html.darklup-dark-mode-enabled body{ background-color:#000000 !important; color:#dddddd !important;}'); }); </script> or <script type="text/javascript"> jQuery(finestra).load(funzione() { tinyMCE.activeEditor.dom.addStyle('html.darklup-dark-mode-enabled #wpforo #wpforo-wrap .wpf-post-create body{ background-color:#000000 !important; color:#dddddd !important;}'); }); </script>