Skip to main content

Dear team, your help is greatly appreciated :)

Hi @Elad 

You can do so via the <b> html tag. The “content” property for createText supports multiple HTML tags including <b>. You can read more here: https://developers.miro.com/docs/websdk-reference-text#content

If you want to try a code snippet that will make a part of your text bold, you can try this one:

 

const text = await miro.board.createText({
content: '<p><b>This is a piece</b> of text to remind me that I always finish what I ...</p>',
style: {
color: '#1a1a1a', // Default value: '#1a1a1a' (black)
fillColor: 'transparent', // Default value: transparent (no fill)
fillOpacity: 1, // Default value: 1 (solid color)
fontFamily: 'arial', // Default font type for the text
fontSize: 14, // Default font size for the text
textAlign: 'left', // Default horizontal alignment for the text
},
x: 0, // Default value: horizontal center of the board
y: 0, // Default value: vertical center of the board
width: 300,
rotation: 0.0,
});

console.log(text);

 


Thanks for the reply it is working perfectly!


Happy to help :) 


Reply