jsyg-fulleditor-menus
v0.1.11
Published
Menus plugin for JSYG.FullEditor
Downloads
3
Maintainers
Readme
JSYG.FullEditor.Menus
Menus plugin for JSYG.FullEditor
Demo
http://yannickbochatay.github.io/JSYG.FullEditor.Menus
Installation
bower install jsyg-fulleditor-menus
Example
HTML
<div id="menuBar"></div>
<svg width="500" height="500" id="editor"></svg>
Javascript
var svgEditor = new JSYG.FullEditor("#editor");
svgEditor.enable();
var fileMenu = svgEditor.createMenu("openFile","print","downloadSVG","downloadPNG").set({title:"File"});
var toolsMenu = svgEditor.createMenu("selectionTool","insertText","insertImageFile","drawRect","drawPolyline","drawPath","drawFreeHandPath").set({"title":"Tools"});
toolsMenu.addItem({
text:"personal item",
icon:"ledicon user",
action : function() {
//do something great
}
});
new JSYG("#menuBar").menuBar([fileMenu,toolsMenu]);
Full example script
https://github.com/YannickBochatay/JSYG.FullEditor.Menus/blob/master/script.js