Hello all and thanks in advance. I won't take long...
I have a text style named myStile in the stylesCombo styles file::
name : 'myStyle', element : 'span', styles : { 'font-family' : 'Verdana'}
When I apply it to the text in CKEditor, I would like to have something like this:
<span class="myStile">This should be Verdana font family</span>
(note that I want to call a CSS style using the name)
... but the code that CKEditor creates (and that does not satisfies me ) is:
<span style="font-family: Verdana, Arial;">This should be Verdana font family</span>
Can CKEditor be configured in any way to call a CSS Style using its name? I've seen this is one of the most powerful editors and I seriously doubt it couln't.
Thanks again to anyone that could help me.
Thu, 12/17/2009 - 14:53
#1
Re: Applying CSS using CSS names
name : 'myStyle', element : 'span', attributes: { 'class' : 'myStyle'}
Re: Applying CSS using CSS names
Yes! This is the way to do it. Unfortunately this only works on Internet Explorer. Firefox isn't able to do it and it just adds an empty <SPAN> tag.
This happens not only in my customised editor: it also happens in the replacebyclass.html example that comes with the editor.
Do yoy know any trick to asolve this? I'm trying it my way and I'll post the solution in I find it.
Best regards,
Re: Applying CSS using CSS names
cheers
Steve
Re: Applying CSS using CSS names
Thanks1
Re: Applying CSS using CSS names
FF is 3.5.6 and IE8