Is there any way to create classes thus they will show in the FCK, but in the sourse present only class="myclass"?
Example. Now if we create class myclass: color: #ff0000 and then mark some text in the editarea and set this class to it. It will be shown by red on the FCK and on the page. It seems everything ok, BUT if we look through source we see follow <span style="color: #ff0000">my text</span>. But I don't need it. Is it possible to force FCK create follow code <span class="myclass">my text</span> instead of previous? If yes, please describe how.
Example. Now if we create class myclass: color: #ff0000 and then mark some text in the editarea and set this class to it. It will be shown by red on the FCK and on the page. It seems everything ok, BUT if we look through source we see follow <span style="color: #ff0000">my text</span>. But I don't need it. Is it possible to force FCK create follow code <span class="myclass">my text</span> instead of previous? If yes, please describe how.
RE: How to do class instead of style?
<Styles>
<Style name="Title" element="div">
<Attribute name="class" value="content_header" />
</Style>
That adds the "content_header" class to the currently selected text.
Also, make sure you set:
FCKConfig.EditorAreaCSS = 'Your Style Sheet';
So that the FCKEditor is using the correct style sheet for display.
RE: How to do class instead of style?