I know you can update specific text styling by referencing the specific text element. However, is there a way to update the styling used for html subset tags like H1, H2, etc?
For example, we want to use the font Proxima Nova for our H1, H2 and paragraph text. However, we want to use a font-weight of 800 for our H1 tags. I cannot find any way to do this without targeting every text element separately.
You can start with the article Customizing and Saving Text Themes and check the other Editor articles and docs for further information. Your question isn’t really a Wix Code question, so if you need further details or clarification, I would recommend contacting the Wix support team , as they know best.
Thanks for the reply. Maybe my original post was not clear. I am aware of the theme customizations that can be made and saved in the Wix Editor, however, I was hoping to find a way using Wix Code to make more advanced style changes. The Wix Editor is extremely limited.
In my example from the original post, I want to use “Proxima Nova Extra Bold” and “Proxima Nova Medium”. To accomplish Proxima Nova Extra Bold all you need to do is style Proxima Nova with
font-style: normal; font-weight: 800;
According to wix code documentation, you can assign these styles “inline” for each text element. But hoping to find a way to do this site wide, ideally updating the theme tags.
const textElements = $w('Text') // array of text elements in the page
textElements.forEach(textElement => {
textElements.forEach(item => {
$w(`#${item.id}`).html = // manipulate the style here...
});
});
You can place it it in the site code section.
Please update in your progress.
Roi.
I have also prob with h1… on product page is chosen h2 tag, but if I check it through the source page, its shown as h1 n its all over my pages… how can I fix this error, support??? I contacted previously n u said its fine, but actually h1 is double… HELP )