Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
CSS for HTML Editor content
posted

Is there a way to set a custom CSS for the content of the HTML Editor?

Parents
No Data
Reply
  • 1300
    Offline posted

    Hello, Lauren, 

    After looking further into your requirement, I determined that setting a custom CSS for the content of the HTML editor can be achieved with contentWindow method. This method returns the window object associated with HtmlEditor`s content editable area. Once the area is retrieved, any css of your choice can be set. For example: 

    var temp1 = $("#htmlEditor").igHtmlEditor("contentWindow").frameElement;
                temp1.style.backgroundColor="red"; 
    

    Here it is a sample for your reference. Please test it on your side and do not hesitate to contact me if you have any additional questions regarding this matter.

Children
No Data