Creates an inline editor instance from the provided DOM element or jQuery selector string. The initial content of the editor is set to the content/value of the element it makes editable.

Example

 

Parameters

element

String

or

Element

Specify a CSS3 selector representing the element you wish Textbox.io to replace for editing. Note that textarea is not supported in this mode.

or

The element you wish Textbox.io to make inline-editable.

configuration Object (optional)

An optional group of key-value pairs that specify options/settings for the Textbox.io instances you are invoking.

Note about selectors

If the selector matches multiple elements, only the first is replaced as per the rules for querySelector.

If it does not match any elements, a JavaScript error will be thrown. If the number of elements that will match is not known, use replaceAll which does not have this restriction.

Returns

textboxio.editorObject

A single instance of the Textbox.io editor.

See also: