Text manipulation

Hi,

I’m wondering what the best way would be to manipulate the text in the nodes.
So you can add a font attribute to the textblock which contains for example: “bold 14pt serif”.

Now if I add a html button to set the text to bold or italic. How should I start?

The Mind Map sample, http://gojs.net/latest/samples/mindMap.html, demonstrates one way to do that.

thanks for the link, I’ve been checking out the code that it’s been using… But what does the obj stand for as parameter?

As I thought of doing something like this:
http://pastebin.com/GENVS8aC

but it seems the error resides at the findObject. So I’m not sure the ‘node’ is in fact ‘node’.

If you are talking about the arguments to the function that is the value of GraphObject.click, that is documented in that property description: http://gojs.net/latest/api/symbols/GraphObject.html#click.

In the debugger you can call x.toString() to see what kind of object it is, or use x instanceof go.Node.

Awesome it works!!! Project almost finished :)
Thanks for the debugger tip, I never really used console log or debugging in javascript till I started using this library.