Node textarea and <input>

How to bind the value of textarea and input on the node data of gojs? And is it two-way synchronous display of data?

Bind data in both directions

There is no direct way to do that – you need to implement the behavior that you want. Perhaps GoJS HTML Interaction -- Northwoods Software will help. It depends on what you want to do.

I found
new go.Binding(“text”, “text”).makeTwoWay())))
in the development documentation;
how do I bind my own document.getElementById().value to text in both directions?

我在开发文档中找到了new go.Binding(“text”, “text”).makeTwoWay())));我如何将我自己的document.getElementById().value 双向绑定到text中?

As I said, in GoJS data binding only ties GraphObject (or subclass) properties with data properties (or other GraphObject properties in the same binding context). GoJS data binding does not know about other places where state might be saved. I suggest that you use other frameworks for data binding to <textarea> (or other HTML control) properties.

As an example of this, see the Data Inspector: Data Inspector demonstrates three of them. It effectively binds selected node data properties to HTML element values. If you understand the code to implement the Data Inspector, at, then you will be able to implement your own binding between GoJS model data or GoJS GraphObject properties and HTML state.