Hello
I use Joomla 5 , RTSFormPro and the JCE editor as standard editor.
Now I have in a from a textarea with JCE as editor. Via javascript I want now to change the background color of the textfield. I analysed with the develooper tools my html page and found out, that the textfield is the body of an iframe. I added for the body of the iframe in the developper tools a style parameter background: rd and it works. But how can I do it with javascript. Everything I tried failed like the following code:
var iframe = document.getElementById("event-beschreibung_ifr");
var iframeDocument = iframe.contentDocument || iframe.contentWindow.document;
var iframeBody = iframeDocument.body;
iframeBody.style.backgroundColor = "lightblue";
I hope you caan help me a bit. I added the screen shots of my screen with the developper tools view. One the field is in white (because no style parameter was add). The other screenshot shows when I added the style parameter.
Regards
Hubert
