Adding Custom CSS Classname to WSYWIG Editor's body
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: www.stratavie.com/.../custom-css-in-editor), 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.
Thanks.
Hello,
In order to achieve you need you can add this class onClientLoad event.
To doe so you can check this article as a sample:
http://www.sitefinity.com/developer-network/knowledge-base/missing-styling-of-tables-inside-content-block-on-firefox
the only change is that on step 2 you can replace the function as:
function
fixEditor(sender, args)
$(sender.get_contentArea()).addClass(
"myCustomClass"
);