More in this section

Forums / Developing with Sitefinity / Adding Custom CSS Classname to WSYWIG Editor's body

Adding Custom CSS Classname to WSYWIG Editor's body

2 posts, 0 answered
  1. Keith
    Keith avatar
    1 posts
    19 Nov 2014
    08 Apr 2015
    Link to this post

    I'm developing on Sitefinity 7.3 and want to add custom CSS classnames to the WYSIWYG editor's body element which currently looks like:

    <body class="sfreContentArea">...</body>

     Would like to be able to do:

    <body class="sfreContentArea myCustomClass">...</body>

    Since this is embedded in an iframe and loaded on demand, I'm unable to access the editor when it loads.

    I've dug around quite a bit looking for a solution but haven't been able to come up with anything that's supported. Short of implementing a custom editor, which I've actually tried with no luck (no change in the editor itself, doesn't seem to recognize my custom editor) as outlined here:, the only other suggestions I've found are against older versions of Sitefinity, that recommend attaching a Javascript function to the load event of the editor which would be great if I could figure out how to do that in 7.3.



  2. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    06 Sep 2017
    29 Apr 2015
    Link to this post

    In order to achieve you need you can add this class onClientLoad event.
    To doe so you can check this article as a sample:

    the only change is that on step 2 you can replace the function as:
    function fixEditor(sender, args) {

    Additional information could be found here.

    I hope the information above was useful.

    Svetoslav Manchev
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
2 posts, 0 answered