creating css for the richtext editor - different classes on the same tag
Hi,
I'm trying to add some css classes/properties to the editor and I've managed to add some tags and classes separately. The only thing I'm having trouble with is adding a tag+class to the stylesheet property. For example, I want to have 2 <a> styles to choose from: a.link1 and a.link2. I added a stylesheet property and set the alias to a.link1 and gave it all the css stuff I wanted it to have. I can select it in the editor but it doesn't give it any style. Viewing the html, all i get is <a href="#">my text</a>... no class applied. Also, I noticed that right after selecting from the drop down the drop down goes back to "styles".
What I've been able to get working is to define the styles without the tagname (a) on the aliases, so: .link1 and .link2, and then *not* writing the CSS in those, but writing the correct CSS for them in the file (when you click the filename):
a.link1 { color: #f00; }
a.link2 { color: #0f0; }
- leaving off the tagName from the alias allows you to apply them to links, and including them in the CSS makes them seem to only apply to links (even though it's possible give those classes to other elements, they won't seem to have any effect).
creating css for the richtext editor - different classes on the same tag
Hi,
I'm trying to add some css classes/properties to the editor and I've managed to add some tags and classes separately. The only thing I'm having trouble with is adding a tag+class to the stylesheet property. For example, I want to have 2 <a> styles to choose from: a.link1 and a.link2. I added a stylesheet property and set the alias to a.link1 and gave it all the css stuff I wanted it to have. I can select it in the editor but it doesn't give it any style. Viewing the html, all i get is <a href="#">my text</a>... no class applied. Also, I noticed that right after selecting from the drop down the drop down goes back to "styles".
What am I doing wrong? is it possible to do this?
Thanks,
Eyal
Hi Eyal,
What I've been able to get working is to define the styles without the tagname (a) on the aliases, so: .link1 and .link2, and then *not* writing the CSS in those, but writing the correct CSS for them in the file (when you click the filename):
- leaving off the tagName from the alias allows you to apply them to links, and including them in the CSS makes them seem to only apply to links (even though it's possible give those classes to other elements, they won't seem to have any effect).
/Chriztian
Thanks... I'll give it a shot.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.