setViewMode()
Description
Sets the mode of Diagram Editor
Usage
setViewMode(mode: string): void;
Parameters
mode
- (required) the mode of Editor:- "preview" - the mode is used to show the diagram. Most of the editing functions of Editor are not available. The left and right panels are hidden
- "edit" - the mode is used to edit the diagram. All the functions of Editor are available. The left and right panels are shown
Example
const editor = new dhx.DiagramEditor("editor_container");
editor.parse(data);
editor.setViewMode("preview"); // "preview" or "edit"
Change log: Added in v4.1