replace method is used to create a Textbox.io editor. The method takes a CSS3 selector as an argument, which identifies a target element on the page, and then replaces it with an editor. This target element must be either a
<textarea> element. The target element's contents are automatically loaded into the new Textbox.io editor.
Form Handling / Editor Contents
When used in conjunction with a
<textarea> in an HTML
<form> the content contained within Textbox.io will be submitted as part of the form's POST operation.
Restoring the source element (Removing the editor)
editor.restore method enables you to remove Textbox.io instances from the page, restoring the original target element. When called, editor.restore updates the target element's HTML content to match the HTML content of the Textbox.io editor.