By default, in GoJs, when user tries to edit text in textblock of gojs, white background appears. I need to change this white color to some different color. How can I do that?
First, become familiar with TextEditingTool and HTMLInfo:
In particular, note that you want to modify HTMLInfo | GoJS API.
And you can get the default HTMLInfo at
TextEditingTool | GoJS API.
And like all tools, you can get the default TextEditingTool at ToolManager | GoJS API.
So one way to do it is to define your own CSS class:
<style>
.myTextEditorCSSClass {
background: magenta;
}
</style>
and then right after your Diagram initialization:
myDiagram = $(go.Diagram, ...)
var tool = myDiagram.toolManager.textEditingTool;
tool.defaultTextEditor.mainElement.className = "myTextEditorCSSClass";