If you run into troubles, got a suggestion, or issue, please e-mail editor@webtigerteam.com

Embedding the editor into a web page

Using a Iframe

Some editor option can be set via query string options.

Script that replace textarea

Put the following script in the page header. It will replace any textarea with class="editor". The script will also disable a bunch of plugins to make the editor feel more lightweight.

Then insert the editable text as a textarea.

The script will automatically update the content of the textarea when you edit the file in the editor!
You can access the text by accessing the textarea value, for example:

Demo

See the textarea below, it should have been replaced by the editor. Try typing something then click "Run code" to evaulate it:


Communicating with the editor

Due to browser permissions it's not possible to interact with the editor via iframe.
You can however use postMessage.

openFile

Opens a file:

And when the file is changed, the content is sent back:

disablePlugin

Disables a plugin.