Streaming live at 10am (PST)

Adding "strike through" style in a rich text element from a CMS collection

#1

Hi All,

I’m having trouble styling text in a rich text element that is bound with a cms collection. Does anyone know how I can do that? It’s a couple of lines that need to have the strikethrough.


Here is my public share link: LINK
(how to access public share link)

#2

Unfortunately, inside a RTF field you can’t style a string of text that way, unless you overrode the styling of one of the elements that are supported. Example > give the Rich Text element a class. Then modify the styling for All Italics, when nested inside of “class” you gave to the RTE. Of course this will effect all italicized text on all dynamic pages inside. You could do that to an H6 element, which might be a better target.

image

CloudApp

Elements you can create inside of a rich text:
  • Paragraphs
  • Headings (H1-H6)
  • Images
  • Image Captions
  • Image alt attributes
  • Block quotes
  • Unordered Lists (bulleted)
  • Ordered Lists (numbered)
  • Videos (Youtube, Vimeo)
  • Rich media (Google maps, SoundCloud, Imgur, Giphy, Codepen, and more)

For any of the text elements you can add additional formatting:

  • Links (URL, page, email, etc)
  • Bold text
  • Italic text
#3

Hi there

Thanks for responding. Kinda sucks that you can’t style text in a RTE field. Anyways, I found a simple workaround. I used a strikethrough generator and added that text in the collection editor. It works but the only drawback is I can’t use a custom font on the added text. It’s a good enough solution for now though.

Cheers,

#4

I will add that you can create and style spans in text fields / paragraph fields. Glad you found a solution that worked for you.