Hi Dan,
On the further analysis of the shared details, we understood you want to reader a sentence in annotation content in the node and in the sentence, you want to make a single work as bold. In the case of the annotation content, we can apply the same styles like bold, color, font size, etc. for the entire content. We suggest you split the sentence into two sentences based on the style and add the sentence as two annotations and place the annotation using offset and margin. In the sample we have split the word “This is” as one annotation and the word “Sample” as another annotation and added bold style for the second annotation and achieved your requirement. We have added the sample link below for your references.
Code snippet:
let nodes = [
{
id: 'Terminator', offsetX:100, offsetY:100, width: 150, height: 60, shape: { type: 'Flow', shape: 'Terminator' },
annotations:[
{content:"This is ", margin:{right:20},style:{fontSize:15}},
{content:"sample", margin:{left:35},style:{bold:true,fontSize:15}}
]
},
]; |
Regards,
Gowtham