Skip to content

Commit

Permalink
Revert "Adds JavaScript example"
Browse files Browse the repository at this point in the history
This reverts commit 384261c.
  • Loading branch information
alderg committed Jan 28, 2020
1 parent 384261c commit e2a7f9d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 422 deletions.
13 changes: 8 additions & 5 deletions README.md
@@ -1,4 +1,4 @@
# Draw.io Integration
# Draw.io HTML5 Integration

Integration, or "embed mode" is used for cases where the storage of the diagram is taken care of by a host application,
and draw.io is used for diagram editing. In this case, draw.io is used inside an iframe or window with special URL
Expand All @@ -16,7 +16,7 @@ Depending on the requirements, a PNG or SVG image or the XML for the diagram can
- Images (PNG and SVG) should be used for fast loading with no initial delay. Embedding the diagram data for editing in PNG and SVG images can be used to avoid saving the image and diagram separately, but will result in bigger image files. When using a viewer or editor, images should be used to show a placeholder or preview.
- SVG images should be used if hyperlinks and vector images are required. (The SVG output of draw.io uses foreign objects, which are not
supported in IE11 and earlier. To fully support IE11 in SVG output, certain application features must be disabled, which is not recommended.)
- XML should be used if no image version of the diagram is required or to store the XML separately from the image. A viewer or editor is required
- XML should be used if no image version of the diagram is required or to store the XML separately from the image. A viewer or editor is required
to handle these files.
- PNG images should be used if a bitmap image is required, to support IE11 and earlier or for special fonts.

Expand All @@ -34,9 +34,12 @@ Fonts, colors, default styles, libraries, CSS and more can be configured to matc

The following examples are available:

* <a href="http://jgraph.github.io/drawio-html5/javascript-api.html" target="_blank">JavaScript API</a> for editing embedded SVG and PNG images in a HTML page
* <a href="http://jgraph.github.io/drawio-html5/localstorage.html#default" target="_blank">Using Local Storage</a> Saving and loading a draw.io diagram to/from HTML5 local storage (use the part of the hash-tag to change the local storage key)
* <a href="http://jgraph.github.io/drawio-html5/localstorage-svg.html#default" target="_blank">Using Local Storage (SVG)</a> Saving and loading a draw.io diagram to/from HTML5 local storage as SVG (use the part of the hash-tag to change the local storage key). This example uses an SVG element instead of an image to support hyperlinks. Keep in mind that draw.io uses foreignObjects for text labels in static SVG output. ForeignObjects are not supported in IE11 and earlier. (For draft states, a special dialog is now available.)
* <a href="http://jgraph.github.io/drawio-html5/localfile.html" target="_blank">Using Local File</a> Saving and loading to/from a self-modifying local file
* <a href="https://github.com/jgraph/drawio-html5/webdav" target="_blank">Using embed mode with WebDav</a>
* <a href="https://github.com/jgraph/drawio-github" target="_blank">Using embed mode with GitHub</a>
* <a href="http://jgraph.github.io/drawio-html5/collapsed.html" target="_blank">Embedded diagram in hidden container</a> Test case for hidden containers

Additional examples are available in the following repositories:

* <a href="https://github.com/jgraph/drawio-webdav">Using embed mode with WebDav</a>
* <a href="https://github.com/jgraph/drawio-github">Using embed mode with GitHub</a>
11 changes: 11 additions & 0 deletions collapsed.html
@@ -0,0 +1,11 @@
<html>
<body>
<div style="display:none;" id="section">
<div class="mxgraph" style="position:relative; overflow:auto; width:99%; background-color:#ffffff;">
<div style="width:1px; height:1px; overflow:hidden;">7V1Zc/pGEv8s++Cq7INdukGPGEOS3fwTV5yq3X2UQYapCA0ZCWPvp0/3HNJoEFgyh514oADNdWj6p/71nFz549XL9yxZL7/ReZpdec785cq/u/I8d+AN4Qd9XqWP40bCZ8HIXPrVHg/k/6mKKH03ZJ4WjYglpVlJ1k3PGc3zdFY2/BLG6LYZ7YlmzVLXyUKVWHs8zJJs1/c/ZF4uhe/Qk3eB/j+kZLFUJbtRLEIek9nvC0Y3uSzvyvOf+EsErxKVl7zRJyKz4G5/Aq3KKAU/vFq9jNMMW1a1mUg03RNaVZqluZ7r/gS+SPGcZBt541delEHa2ycKWXhOUb7KJon+2GC1eMB1wQU2gghutH6pA+Fqgb+TvEzZmpEiVfk9MhU2YrMlKUFoG9YSqnyg0qIKyhvrWdfGK5bJGi/JikvydlmuMnC6cPmcspKAKH9KHtPsnhakJDSHsBWZzzF5FWGUkUUjgGc2KtYCUY7yget5UiZww8LpTYvnxZV3+wJFeuMrL/TH3CP0HPDKC/SBOoaetyzLNbqgpUKQAn5tt1v8nWyh7eGHMp5w6jkOyAouZE5wu5DdlmOvys73eRwRthT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w7lss7Cy0nYW2s9B2FvozzELvTDm3kGjnVUgyA3X67iU3j+P/bFnLaL+cDevmnZa9IPSzdjyjwU0YQEnDaBBEcew0x+f8ILoJfQf+4ymAXdGeOu+5v5kf3wxhYzI8gTwvYxQQdMWNA4OMcQT/ToW1kR2aj7CqwMkoGj91dDjAe/mNzlOM8Sc=</div>
</div>
</div>
<button onclick="document.getElementById('section').style.display = 'block';">Expand</button>
<script type="text/javascript" src="https://www.draw.io/embed.js"></script>
</body>
</html>

0 comments on commit e2a7f9d

Please sign in to comment.