dist/demo.js
/**
     * Assigns properties to a range of text.
     *
     * @param {number} index The position where to start formatting.
     * @param {number} length The amount of characters to assign properties to.
     * @param {TextAttributes} attributes Attribute information to apply on the
     *                                    text.
     *
     * @public
     */
Assigns properties to a range of text.
@param {number} index The position where to start formatting.
@param {number} length The amount of characters to assign properties to.
@param {TextAttributes} attributes Attribute information to apply on the
text.

@public
Assigns properties to a range of text . @param { number } index The position where to start formatting . @param { number } length The amount of characters to assign properties to . @param { TextAttributes } attributes Attribute information to apply on the text . @public
format (index, length, attributes) {
      if (length === 0) {
        return
      }
      const y = this.doc;
      if (y !== null) {
        transact(y, transaction => {
          const pos = findPosition(transaction, this, index);
          if (pos.right === null) {
            return
          }
          formatText(transaction, this, pos, length, attributes);
        });
      } else {
         (this._pending).push(() => this.format(index, length, attributes));
      }
    }
format ( index , length , attributes ) { if ( length === 0 ) { return } const y = this . doc ; if ( y !== null ) { transact ( y , transaction => { const pos = findPosition ( transaction , this , index ) ; if ( pos . right === null ) { return } formatText ( transaction , this , pos , length , attributes ) ; } ) ; } else { ( this . _pending ) . push ( ( ) => this . format ( index , length , attributes ) ) ; } }
Assigns properties to a range of text.
Assigns properties to a range of text .
/** @type {Array<function>} */