Hi,
Can you tell me how to change the background color from the CKEditor.
$('#x_<field>').css({'background-color':'#FFE6E6'}); <--- this is not working .
Regards,
Hi,
Can you tell me how to change the background color from the CKEditor.
$('#x_<field>').css({'background-color':'#FFE6E6'}); <--- this is not working .
Regards,
If you want to change the background of input area, you can customize the content.css inside the ckeditor folder.
update the background-color: #fff to #FFE6E6.
Hi,
We want to modify the background-color of input area on the fly. Not the content.css inside the ckeditor folder.
Example:
If the field input area of the ckeditor is empty then the background-color is red (required).
If the field input area of the ckeditor is NOT empty then the background-color is transparant.
Regards, Danny
You need to select the Body element inside the iFrame of CKEditor. Please try:
$(".cke_wysiwyg_frame").contents().find(".cke_editable").css("background-color","#FFE6E6");
Hi,
This code is not working. Do you have an other solution ?
Here some code with inspect.
<iframe tabindex="0" title="Tekstverwerker, x_Gespreksverslag, Druk ALT 0 voor hulp" class="cke_wysiwyg_frame cke_reset" aria-describedby="cke_51" src="javascript:void(function(){document.open()%3B(function()%7Bfor(var%20a%3B%3B)try%7Ba%3Dwindow.parent.document.domain%3Bbreak%7Dcatch(f)%7Ba%3Da%3Fa.replace(%2F.%2B%3F(%3F%3A%5C.%7C%24)%2F%2C%22%22)%3Adocument.domain%3Bif(!a)break%3Bdocument.domain%3Da%7Dreturn!!a%7D)()%3Bdocument.close()%3B}())" frameborder="0" style="width: 100%; height: 100%;" allowtransparency="true"></iframe>
Regards,