Streaming live at 10am (PST)

Inline italic style CMS Name Field


CMS question:
I have a branded name in my name field that needs to be italicized

It is an H2

So How do I do it?



The name field is unformatted - No way by the CMS.

Maybe add some custom code JS (Select the word and change it to italic).

First, Add id for the heading (By webflow UI)

<h2 id="demo">Visit UMF</h2>

Next, Add this code for post page (before body)

function changeUMFtoItalic() {
    var str = document.getElementById("demo").innerHTML; 
    var italicStr = str.replace("UMF", "<i>UMF</i>");
    document.getElementById("demo").innerHTML = italicStr ;

This code will work fine for post page (change one heading). For collections you should use another code (loop throw all h2 inside some wrapper)


super awesome. JavaScript FTW! Thanks ! :grinning:


Great :slight_smile: mark as solved to close this topic