title: Import Shapes of Custom Library from Draw.io in mxGraph
body: <p>I'm currently working with the mxGraph library in javascript and I'm trying to create my own shapes in draw.io, to export them, then to reuse them as much as I want in my own program using the mxGraph library.</p>
  <p>So far, I have tried to create a custom library, which contains all my shapes. I have exported it in XML which gives me a half-encoded XML file. Then, I'd like to import that mxLibrary in my own app so I can reuse these shapes for creating my own diagrams. I have no idea how to deal with that XML file.</p>
  <p>I have also tried taking the XML from <code>Extras -&gt; Edit Diagram</code> and reimport it with the codec, then with <code>mxGraph#addCells</code> but the shapes aren't grouped anymore, and I can't seem to find how to clone them.</p>
  <p>My goal would literally to have my list of shapes/cells somewhere, which I can reuse whenever I want.</p>
  <p>If this is not possible, how may I do that instead? I have also looked up how to create my own shapes (with redrawPath and the style thing), but it looks really long and boring.</p>
  <p>Here's an example of what the XML looks like. The shape is a simple double square.</p>
  <pre><code>&lt;mxlibrary&gt;[{&quot;xml&quot;:&quot;xVNBbsIwEHyN78EugjOhcOqpLzDJgi05XstZSPJ7trFbiAqCqpV6sLQ7O2N7xrJQZdNvow7mDWtwQr0KVUZESlXTl+CckIWthVoLKQteQm7uTGfjtAg6gqdnBDIJTtodISEJaGlwGThEPIZMg0jQT46q0HuoSO8+6cX3K4zUfP4WsAGKA1M6W5NJjGVWGbAHQ1NMt/keX8qLHy6ypdv21GN7nbEE70FXH33HDyHUylDDO65nXOo2sD1u9rYH3nV1N4lrx/LfHL/8veO9da5Eh5Exjx5+GUIWzJNgmHRXAS1uBLT4eUDcXn7TOJt8tjM=&quot;,&quot;w&quot;:80,&quot;h&quot;:80,&quot;aspect&quot;:&quot;fixed&quot;,&quot;title&quot;:&quot;custom_shape_1&quot;}]&lt;/mxlibrary&gt;
  </code></pre>
  <p>Thank you in advance!</p>