Is there a custom code to make all headers in lowercase in CMS?

Guys, I need help! I transferred the client’s website from WordPress to Webflow using CSV. The issue is - their headers (all, H2, h3, h4 etc) in capslock. We need it to be in lowercase, like regularly. First letter caps and other letters lower. Editing manually gonna take ages because there are 94 blog posts with 10-18 headers in each. Is there any code I can add to the rich text in cms or somewhere else that makes these headers in lowercase?

@Mika_Khassenova - Case should be handled with CSS. You can use nested styles of a rich text element with a class assigned or style any CSS field in your template with a class. Look in the text section. If you are just learning how to use the designer head over to Learn web design with free video courses and tutorials | Webflow University.

1 Like

Thank you, I’ve been creating webflow websites last 3 years, so everything is in rich text nested, and customized. The problem is that blog CVS was exported from Wrodpress and originally it’s capslock, so playing with CCS I can only make it lowercase all, but I don’t need it. I need the headers to be regular, with caps on names and so on.

Finsweet attributes has a component for rich text. You could use it to achieve what you want. You could also just craft a style block of CSS and write a rule that targets what you want.

1 Like

As Jeff said, CSS is the best approach, however IIRC text-transform: capitalize will only uppercase the first letter of each word, and it will not lowercase the remaining letters - so your all-uppercase content presents a problem.

This behavior makes sense because if I write, e.g. “IBM releases new AI” and CSS capitalize that, I want “IBM Releases New AI”, not “Ibm Releases New Ai”.

You could do a lot of python or script work to fix your CSV content before importing it, to fix this. Other options are…

  • Manually edit everything after you load it
  • Use JS to fix titlecasing
  • Use a reverse proxy to fix it

The easiest way than torching your self and data is going back to WP, change setting for headers and export again. :man_shrugging:

Why?

You can change to lowercase in CSS or JS and change first character to uppercase with charAt(0) method but… there is no way that you will create some automations that will recognise names and capitalise these.

Manual Edit

  1. if you do not have option to export data again you can open csv in code editor where editing will be much easier with search option to jump to exact place.

  2. you can also import csv to excel to have data in cells and edit cell by cell

  3. export from excel column with headings and use chatGPT to do this job for you. “hey chat can you fix these headings to have capilal letter only for first letter and also for person name and surname”

m2c