This is a migrated thread and some comments may be shown as answers.

[Solved] Add a class to the body of the editor?

2 Answers 31 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Day
Top achievements
Rank 1
Day asked on 09 Dec 2010, 12:01 AM
I'd like to be able to add a class to the body tag of the editor within it's iFrame (as opposed to the body that the iFrame is inside of).
Alternatively, I'd like the wrap all the content within that body tag in a div (and then I'd give that div a class).
How would I go about doing that?
Thanks, DK

2 Answers, 1 is accepted

Sort by
0
Day
Top achievements
Rank 1
answered on 09 Dec 2010, 05:24 PM
Alternatively, could I add a script tag to the head of the inline document.
0
Day
Top achievements
Rank 1
answered on 14 Dec 2010, 10:59 PM
In case anyone is looking for the answer, here is what I came up with, using jQuery:

$("#EditorName_contentIframe").contents().find("body").addClass("ClassName");
Tags
Editor
Asked by
Day
Top achievements
Rank 1
Answers by
Day
Top achievements
Rank 1
Share this question
or