muaz-khan / Canvas-Designer

Collaborative, extendable, JavaScript Canvas2D drawing tool, supports dozens of builtin tools, as well as generates JavaScript code for 2D animations.
https://www.webrtc-experiment.com/Canvas-Designer/
MIT License
371 stars 171 forks source link

i'm can'nt add this canvas-designer into my website #32

Closed NgocAnPham closed 7 years ago

NgocAnPham commented 7 years ago

so i tried to add this canvas to my website by your "How to use" but it not work

muaz-khan commented 7 years ago

Download these three files:

  1. canvas-designer-widget.js
  2. widget.min.js
  3. widget.html

Now try this HTML:

<!-- 1st step -->
<script src="canvas-designer-widget.js"></script>

<!-- 2nd step -->
<script>
var designer = new CanvasDesigner();

// both links are mandatory
// widget.html will internally use widget.js
designer.widgetHtmlURL = 'widget.html'; // from your own server
designer.widgetJsURL = 'widget.min.js'; // from your own server
</script>

<!-- 3rd i.e. last step -->
<script>
// <iframe> will be appended to "document.body"
designer.appendTo(document.body || document.documentElement);
</script>
NgocAnPham commented 7 years ago

ok thanks you!