templateMode Property

Description

Specifies whether the editor will be used to edit diagrams or templates. When this property is true, the editor will be used to edit templates. When it is false, the editor will be used to edit diagrams. The default is false.

When the editor is used to edit diagrams, the "Start with a template" button will be available. Template metadata will also be removed from saved diagrams.

When the editor is used to edit templates, the "Start with a template" button will be not be shown and template metadata will be preserved in saved templates.

Example

editor = new window.__editor(undefined, document.getElementById('editor-node'));

...

// Startup the editor with templateMode enabled
editor.startup({
	showToolbar: true,      // Enable the toolbar and symbol manager.
	templateMode: true		// Enable template mode
});