fixed issue with text input on iOS and iframe

## Bug

On iOS Safari, when the Method-Draw component is embedded in an iframe.

1. On an iPad, go to editor/embedapi.html
2. Select the "T" text button and create a new text element
3. The keyboard will pop up ready for input.
4. When typing, no text is entered into the SVG text element.

This is due to an outstanding bug in iOS Safari where programmatically focussing on an element in an iframe will render the text input unable to capture text. Obscure yes! But otherwise essential for our application.

## Fix

Host the text input outside the iframe, in the main page. The text input works as normal, avoiding the Safari bug.

The detects the iframe/iOS environment and creates a new text input in the parent window if necessary. Otherwise it uses the regular `#text` input.