I want to bold a particular word in a text when using a a!richtextitem. when I use the "Style" as "strong", it's making the entire text bold.In my case, I only want a word to be bold as shown below. Can someone please help
a!richTextDisplayField( value: { a!richTextItem( text: { "We recommend ABC method.",}, style: "PLAIN",)
}
)
Discussion posts and replies are publicly visible
Hi hema.mathivathanan,
As richTextDisplayField accepts multiple values in the "value" parameter, we can try the below
a!richTextDisplayField( value: { a!richTextItem(text: { "We recommend", }, style: "PLAIN", ), a!richTextItem(text: { " ABC ", }, style: "STRONG", ), a!richTextItem(text: { "method.", }, style: "PLAIN", ) })
Hope it answers your question!!
In addition to the above reply, you should also know that you can nest a!richTextItem() objects within each other to basically any level. This helps a lot with complicated structures of formatting and also separate links, etc.
a!richTextDisplayField( value: { a!richTextItem( text: { "We recommend", a!richTextItem( text: " ABC ", style: "STRONG" ), "method." } ) } )
Thanks!
Thanks Mike, This nesting helps a lot!
Thank you!