I'm trying to persist MXGraph to DB and re generate upon user request. Below is how use user flow is:
- Created HTML for Vertex
- Added vertex (v) to Graph
- select HTML element (v.getElementById())
- modify HTML in (V) vertex
get XML of graph. Here is Code Snippt im usig to create XML
var enc = new mxCodec(mxUtils.createXmlDocument()); var node = enc.encode(_editor.graph.getModel()); var xml = mxUtils.getPrettyXml(node);
persist it to DB
From above, i'm able to HTML of vertex in Step:1 but not after step:3. But, im sure that i'm trying above code snippet after modifying DOM in STEP:3.
Please let me know how to get XML (with dynamically made HTML Changes).