Streaming live at 10am (PST)

Styling inline in a Rich text field

Is there really no way to style inline text in Rich text fields? CMS or otherwise? I know there are workarounds hacking the Bold and Italics but I want to be able to use those natively. I also know I can use an H tag but I want to keep the styling inline. I also know I can use an embed code and just code it in.

From all I can find the only way to do this is via the embed component. But this is for a CMS. Part of the intent of the CMS is to make things straightforward for the client. It’s crazy that this is still the current situation.

Am I insane or is an embed code the only way to style inline in a Rich text field?

Adding a class to the Rich Text element will allow you to create unique text styles for just that RTE instance. Styling these nested tags will make sure that only elements in an RTE with the same class applied will be affected.

If this is what you are after then this topic in the university explains how to do it (and other info about using the rtf)

Yes, thank you I am very much aware of that.

I want to be able to use bold and italics like this. Or bold and italics. I can to this natively inline. Easy peasy. I could hack one of these to style text with colors and/or but then I can’t use bold or italics in that style.

I could use an H tag. But I want it inline. I could hack it to be inline but then I lose margin/padding functionality. It is a pretty awful workaround and as it is, it looks terrible.

So instead I need to use an embed code:

<p>It's nuts that in order to <span style="background-color: #163c4a; color: #ffffff">highlight text</span> or just <span style="color: d16a0f">change the color of the text.</span> Because if I hack the <strong>bold</strong> or <i>italics</i> inline style then I can't use <span style="background-color: #163c4a; color: #ffffff"><strong>bold</strong> or <i>italics</i> text</span> with a highlight, etc.</p>

@jmkriz - I would suggest at least creating classes on a style guide page (so you don’t delete them) and applying them to elements added via the custom embed inside the RTE. At least you would be able to maintain them. There really is no other way to address this (inline or styles) with WF when trying to format RT content.

That is a great suggestion, I will do that.

Definitely still a pain in the butt for the client and crazy it’s not something that’s integrated already, but that will certainly ease things a bit, thank you.

Try this!

Thanks dude. Finsweet’s solution didn’t exist when I posted this originally. I certainly use it now.

That doesn’t make it any less embarrassing to explain to clients how poor the native RTF controls have remained.