Contentful logo

Contentful Community

How to apply colors to text in content

content_modeling
#1

Hi,
I want to apply color to some of the text in the content. Any Idea would be greatly appreciated.

Thanks

0 Likes

#2

The only way to archive this would be to create your own custom UI extension to replace the Markdown or Rich Text editors.

I very much urge to to re-evaluate if this is really necessary. Chances are that it’s not. Applying styling like color goes very much against Contentful’s ideology of storing semantic content, not styling.

0 Likes

#3

Teemu raises a good point, @Nikhil.

The way to go here would be to associate a CSS property regarding color to your text.

0 Likes

#4

Completely understood and that’s the plan now- Will have a separate text field defined for the one which needs color and separate for the ones that have no styling and group them together on the UI per requirement.

Thanks for the hep @teemu.tammela1 and @gabriel

0 Likes

#5

No problem at all. Glad it helped :slight_smile:

0 Likes