diff --git a/editor/embedapi.html b/editor/embedapi.html index cea5cfcd..41b67985 100644 --- a/editor/embedapi.html +++ b/editor/embedapi.html @@ -38,10 +38,20 @@ function saveSvg() { svgCanvas.getSvgString()(handleSvgData); } + + function exportSvg() { + var str = document.getElementById('svgedit').contentWindow.svgEditor.uiStrings.notification.loadingImage; + var exportWindow = window.open( + 'data:text/html;charset=utf-8,' + encodeURIComponent('' + str + '

' + str + '

'), + 'svg-edit-exportWindow' + ); + svgCanvas.rasterExport('JPEG', null, exportWindow.name); + } // Add event handlers $('#load').click(loadSvg); $('#save').click(saveSvg); + $('#export').click(exportSvg); $('body').append( $('