/* * ext-server_opensave.js * * Licensed under the Apache License, Version 2 * * Copyright(c) 2010 Alexis Deveria * */ svgEditor.addExtension("server_opensave", { callback: function() { var save_svg_action = 'extensions/filesave.php'; var save_png_action = 'extensions/filesave.php'; // Create upload target (hidden iframe) var target = $('').hide().appendTo('body'); svgEditor.setCustomHandlers({ save: function(win, data) { var svg = "\n" + data; var title = svgCanvas.getDocumentTitle(); var filename = title.replace(/[^a-z0-9\.\_\-]+/gi, '_'); var form = $('