create a new css call it say editor. under it create your style definitions eg h1 h2 and put styles in there. then goto developer section and pick the rich text edit datatype and from the available css select editor. when you now got back to content editor the styles that you defined will no be available from the styles drop down. Please note you have to also put the styles in your main style sheet.
if you create the class and in alias for it put .whatever then when you select a some text in rich text edit it will wrap it with a span with that class not sure if you can without editing raw html get exact effect that you are after.
Create a new style with a.) Name of "myAssignedClass" and b.) Alias of ".myAssignedClass"
Associate it with your RTE
Then when you are in the RTE, click to place the insertion point in a block of text (without selecting text), choose myAssignedClass from the styles dropdown and it will apply the style to the containing paragraph element. If you click and drag to select a block of text and then select the style, it will wrap it in a span element.
If you want to remove the class, select "Styles" from the style dropdown and it will be removed.
Assign class in tinyMCE
I would like to be able to assign a class to text from the tinyMCE. How can this be done
Thanks
create a new css call it say editor. under it create your style definitions eg h1 h2 and put styles in there. then goto developer section and pick the rich text edit datatype and from the available css select editor. when you now got back to content editor the styles that you defined will no be available from the styles drop down. Please note you have to also put the styles in your main style sheet.
Regards
Ismail
thanks, but this is not what I want.
I know how to assign styles to text.
What I want is:
lets say I have
<p>this is some text</p>
then I want to choose a class and assign it. Now the code should look like this
<p class="myAssignedClass">this is some text</p>
if you create the class and in alias for it put .whatever then when you select a some text in rich text edit it will wrap it with a span with that class not sure if you can without editing raw html get exact effect that you are after.
Regards
Ismail
If you do like Ismail has suggested:
Then when you are in the RTE, click to place the insertion point in a block of text (without selecting text), choose myAssignedClass from the styles dropdown and it will apply the style to the containing paragraph element. If you click and drag to select a block of text and then select the style, it will wrap it in a span element.
If you want to remove the class, select "Styles" from the style dropdown and it will be removed.
thanks, I will give it a go tomorrow
is working on a reply...