0

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.

Rune
  • 159
  • 1
  • 7
  • I have no clue of how to send the SVG back and forth to an editor window. I was trying something along the lines: h=window.open.... is there an example. So far I manually copy the SVG html but that is rather clumsy – Rune Jun 26 '15 at 13:36

1 Answers1

0

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)

Jan Doggen
  • 8,799
  • 13
  • 70
  • 144
Rune
  • 159
  • 1
  • 7