This is what the corvidReference page has on the subject with no examples to copy. When I write the code line $w(‘#txtHeaderStripCaption’).html = “” it is getting an error saying "Parsing error: Unexpected token font.
Can anyone advise me please?
Can anyone advise me please?
You need to use html in a html iframe or a html component or in a rich text field in your dataset, you can’t just simply add it with your javascript on your page code.
See this previous post and other Wix Support pages too.
https://www.wix.com/corvid/forum/community-discussion/html-in-text
https://support.wix.com/en/article/corvid-about-formatting-text-elements
https://support.wix.com/en/article/connecting-text-elements
https://support.wix.com/en/article/corvid-working-with-the-html-element
https://support.wix.com/en/article/corvid-tutorial-creating-a-rich-text-editor-using-the-html-component
https://www.w3schools.com/tags/tag_span.asp
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_span
before you responded givemeawhisky I found https://www.wix.com/corvid/forum/corvid-tips-and-updates/create-responsive-text which I have used to change the text
@cliffhegan
Great News
@givemeawhisky Can you advise me on how to format the FONTFACE attribute in the STYLE please?
@cliffhegan
You can simply just do a online search for that sort of info.
https://www.w3schools.com/cssref/css3_pr_font-face_rule.asp
https://www.w3schools.com/tags/att_font_face.asp
https://www.smashingmagazine.com/2013/02/setting-weights-and-styles-at-font-face-declaration/
https://www.tutorialspoint.com/How-to-change-text-font-in-HTML
https://en.wikipedia.org/wiki/Font_family_(HTML)
@cliffhegan Careful with your placement of double quotes. The first time they are placed, they are opening quotes, and the next time the Javascript engine sees them, they will be considered closing quotes. So if you close them before the word font , the browser won’t know what to do because you haven’t the Javascript engine what font means. Whereas if you keep the entire html string together with the proper usage of quotes, it will be interpreted as html.
You can also use single quotes and tildes to hold strings : ’ ’ and
Not sure what the benefit of writing it this way for mine I prefer to keep it all in line like this you can style the text and individually change the style in the span this way in wix
$w ( ‘#descriptionText’ ). html = “
” + "MEALPLAN ID: " + “” + mealPlanid ; “” ; “
” ;