Embedding SVG edit as a inline editor

北城余情 提交于 2019-12-11 14:34:11

问题


How can this be accomplished in a HTML page: Click on the SVG image will open SVG editor in another window. On closing the window (after Y/N prompt) the svg code in the opener window will be updated.


回答1:


Well I found a solution: having opened the editor with

hWinEdit=window.open('svg-edit-2.7/svg-editor.html','SVG-edit');

I then add the onbeforeunload event:

hWinEdit.onbeforeunload=function(){hWinEdit.opener.svgClose();};

where svgClose is my function getting the SVG HTML string:

s=hWinEdit.svgCanvas.getSvgString();

Anyway I think I have to abandon SVG-Edit as there are too many critical bugs for my purpose. (Connectors not working, hangups etc)



来源:https://stackoverflow.com/questions/31021752/embedding-svg-edit-as-a-inline-editor

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!