I need to bold few words in a texfield.
For example,
below are my XML
<paragraph>"Join with <b>Adobe enterprise products</b>. Access a vast library of learning content and <b>courses</b>, get personalized recommendations, and <b>connect with a vibrant community of fellow learners</b>".</paragraph>
And I change the field format to Rich text. But that doesn't help
I was expecting for something like below.
"Join with Adobe enterprise products. Access a vast library of learning content and courses, get personalized recommendations, and connect with a vibrant community of fellow learners".
But All I got is
Join with <b>Adobe enterprise products</b>. Access a vast library of learning content and <b>courses</b>, get personalized recommendations, and <b>connect with a vibrant community of fellow learners</b>
I can only bold the entire text field.
Solved! Go to Solution.
Views
Replies
Total Likes
If you are using sightly to display content on the webpage then please use context
${textfieldname @ context='html'}
It should display content in bold.
Please read more about sightly and context tokens here
Hope this helps!!!
Thanks,
Aruna
Hi @angela95ry
Are you trying to bold the tooltip or description in the dailog textfield or the text inside the text field?
For the primary case: https://stackoverflow.com/questions/4412395/is-it-possible-to-insert-html-content-in-xml-document
For the secondary case: https://gist.github.com/briankasingli/1a7e3e12deaa2e076645b09d30039b46
Hope this helps!
Thanks,
Kiran Vedantam.
I am try to bold few words of the text inside a text field.
I used the secondary case u suggest, change the XML to below:
<paragraph>"Join with <b>Adobe enterprise products<b>. Access a vast library of learning content and <b>courses<b>, get personalized recommendations, and<b>connect with a vibrant community of fellow learners<b>".</paragraph>
However, it doesn't change the outcome. I am still getting below as the value for the textfield.
Join with <b>Adobe enterprise products</b>. Access a vast library of learning content and <b>courses</b>, get personalized recommendations, and <b>connect with a vibrant community of fellow learners</b>
Hi @angela95ry
If you are using the textfield as RTE, you can use the bold plugin
Thanks,
Kiran Vedantam.
but it's readonly field. So the data are from XML, and there is no edit option.
If you are using sightly to display content on the webpage then please use context
${textfieldname @ context='html'}
It should display content in bold.
Please read more about sightly and context tokens here
Hope this helps!!!
Thanks,
Aruna
@angela95ry As @Anny0505 has mentioned, you can use html context in HTL while displaying the content on the page. That way, whatever HTML tags you give in a text field will get applied on your page. If not it will be treated as a normal text.
Thanks
Veena ✌
Hi @angela95ry ,
You need to use your text field@ context='html' then it will treated as html and it will display text properly on the page.
Kr,
Sanjay
Views
Likes
Replies