Documentation

Element

getType

Returns: String

Return the type of Redactor (textarea, div or inline).

var type = this.element.getType();

Types:

  • textarea
    • if you launched Redactor for textarea tag
  • div
    • if you launched Redactor for div tag
  • inline
    • if you launched Redactor not for textarea/div tags or if the option inline is turned on.

isType

Arguments
type String

Returns: Boolean

Check the type of Redactor (textarea, div or inline).

var is = this.element.isType('inline');

getElement

Returns: Object

Return the wrapped Dom object.

var $element = this.element.getElement();

The element is the initial HTML element for which Redactor was initialized.