Thanks jryancard!
It works, but if i put my classes in editor.css instead of typography.css.
I added this in HtmlEditorField.php
new HtmlEditorField_dropdown("mceSetCSSClass", "styleSelect", array(
"mceContentBody" => "mceContentBody",
"red-text" => "red-text",
)),
In editor.css i put
.red-text{
color: red;
}
In the CMS editor i see the dropdown with red-text. It appears two times, i don´t know why. One of then works perfectly and the other does nothing.
The correct one creates
<span class="red-text">mytext</span>
It is perfect for me.
But i need also to create <div id="red-text">mytext</div> and i don´t know ho to do it. I try to create in editor.css
#red-text{
color: red;
}
But it doesn´t work. Is there a way to do it?
By the way, i read HtmlEditorField_dropdown api info but i think i don´t understand correcty how it works and how to use it. Can somebody explain it?
Thank you in advance.