We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I have a question in p5js. How to change only one word that is included in a hole text displayed as information?
using textStyle(BOLD); change the hole document. Do I have to iterate word by word?
thanks for the help
That's a hairy problem to solve. Guess you're better off asking it in their own repo: :|
Actually the solution was createP(document); it can change only one word to bold the word
@Dazzid: in which case your question was not adequately clear (some code would have helped). The impression was that you wanted to style text being added to the canvas element - which is in fact non-trivial. Styling HTML elements on the other hand is trivial and, as you've discovered, simply a matter of wrapping the targeted text in an appropriate tag. In this case the <strong> tag would be most appropriate...
@blindfish you right, at first glance I was trying to style text being part of p5 drawing text(myText,0,0); but now I do quite the same but using HTML.
Thanks for the support