I have a couple of node types and every node should have multiple text block types. for example, 1 normal text block and another text block should be a dropdown list. based on these articles we can have
custom text editor but this code change all of the text blocks:
because we set the default text editor to our custom editor
myDiagram = $(go.Diagram, "myDiagramDiv", // must identify the DIV
{
// default text editor is now a SelectBox
"textEditingTool.defaultTextEditor": window.TextEditorSelectBox, // defined in textEditorSelectBox.js
"undoManager.isEnabled": true
});
so my question is how can I set custom editor to a specific text block only?
$(go.TextBlock, "----",
{ textEditor = customTextEditor() }, new go.Binding("choices"))
customTextEditor function return a HTMLInfo element
I have this error: Uncaught SyntaxError: Invalid shorthand property initializer
and in api documentation has a notice: As of 2.0 setting, this to an HTML Element is no longer supported.