I'm trying to use mxGraph editor. I read the examples and try to understand it. But I can't. I don't like the xml use. But the examples use XML. I only like programming using Js. From the the tutorial page, in the Input/Output section, they describe the way an XML has built from object. But, from the diagrameditor.xml
file, they have this code:
<mxEditor defaultGroup="group" defaultEdge="connector">
...
<ui>
<add as="graph" element="graph"/>
<add as="status" element="status"/>
<add as="toolbar" element="toolbar"/>
</ui>
...
</mxEditor>
I assume that the object would be:
var editor = new mxEditor();
editor.defaultGroup = "group";
editor.defaultEdge = "connector";
editor.ui.graph.element = "graph";
...
But, I search from the mxEditor API, I cannot find mxEditor.ui
or mxEditor.graph.element
To set the editor graph container, I used the code:
editor.graph.init(document.getElementById("xml"));
But, I did not see this code in the examples. Is it also correct?
How to use mxEditor programatically? or is the a good reference documentation about mxEditor? (not the API specification or the mxGraph tutorial page from Github)