Commit f9b5718e authored by Tristan Cavelier's avatar Tristan Cavelier Committed by Sebastien Robin

OfficeJS can use svg-edit to edit svg images now!

parent 6458e058
<div>
<input type="text"
name="fileName"
id="input_fileName"
value=""
placeholder="File name here" />&nbsp;
<button type="submit"
class="btn btn-primary"
onclick="OfficeJS.save($('#input_fileName').attr('value'));">
<i class="icon-download-alt icon-white"></i>
Save
</button>&nbsp;
<button type="submit"
class="btn"
onclick="OfficeJS.load($('#input_fileName').attr('value'));">
<i class="icon-upload"></i>
Load
</button>&nbsp;
<button type="submit"
class="btn btn-danger"
onclick="OfficeJS.remove($('#input_fileName').attr('value'));">
<i class="icon-remove icon-white"></i>
Remove
</button>
</div>
<iframe src="lib/svg-edit/svg-editor.html"
id="svg_edit_frame"
style="width:100%;
height:500px;"
scrolling="no">
</iframe>
...@@ -96,7 +96,16 @@ ...@@ -96,7 +96,16 @@
'svg-edit': { 'svg-edit': {
type:'editor', type:'editor',
path:'component/svg-edit.html', path:'component/svg-edit.html',
gadgetid:'page-content' frameid:'svg_edit_frame',
gadgetid:'page-content',
getContent: function () {
return document.getElementById (this.frameid).
contentWindow.svgCanvas.getSvgString();
},
setContent: function (content) {
document.getElementById (this.frameid).
contentWindow.svgCanvas.setSvgString(content);
}
}, },
slickgrid: { slickgrid: {
type:'editor', type:'editor',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment