Create editor instances by replacing <textarea> or <div> elements with textboxio.replaceAll(). The initial content of the editor is set to the content/value of the replaced element.
When Textbox.io replaces a <textarea> element within a <form>, it will update the original <textarea> element when the form is submitted, supplying updated content as part of the <form> POST.
When Textbox.io replaces <div> elements, content must be requested from Textbox.io using a JavaScript API, see: Get Editor Content.
Example
<textarea id="editor1">First Content</textarea> <textarea id="editor2">Second Content</textarea> ... // Create a Textbox.io editor by searching for textareas var editors = textboxio.replaceAll( 'textarea' );
<div id="editor1">First Content</div>
<textarea id="editor2">Second Content</textarea>
...
// Create a Textbox.io editor by replacing the specific DOM elements
var div = document.getElementById('editor1');
var textarea = document.getElementById('editor2');
var editors = textboxio.replaceAll( [div, textarea] );
Parameters
or
| String or Array | Specify a CSS3 selector representing the or Specify an array of the |
configuration | Object (optional) | An optional group of key-value pairs that specify options/settings for the Textbox.io instances you are invoking. |
Returns
textboxio.editor | Array | An array of Textbox.io editor instances. Each element matched with |