Pass the SVG to the editor, using editor.svgCanvas.setSvgString(selected); instead. (Suggested by Jeff Schiller) Fix a bug with line and freehand tools caused by activating foreignObject tool. (Again, fix due to Jeff) Sync with SVG-Edit.