dist/demo.js
/**
     * Inserts an embed at a index.
     *
     * @param {number} index The index to insert the embed at.
     * @param {Object} embed The Object that represents the embed.
     * @param {TextAttributes} attributes Attribute information to apply on the
     *                                    embed
     *
     * @public
     */
Inserts an embed at a index.
@param {number} index The index to insert the embed at.
@param {Object} embed The Object that represents the embed.
@param {TextAttributes} attributes Attribute information to apply on the
embed

@public
Inserts an embed at a index . @param { number } index The index to insert the embed at . @param { Object } embed The Object that represents the embed . @param { TextAttributes } attributes Attribute information to apply on the embed @public
insertEmbed (index, embed, attributes = {}) {
      if (embed.constructor !== Object) {
        throw new Error('Embed must be an Object')
      }
      const y = this.doc;
      if (y !== null) {
        transact(y, transaction => {
          const pos = findPosition(transaction, this, index);
          insertText(transaction, this, pos, embed, attributes);
        });
      } else {
         (this._pending).push(() => this.insertEmbed(index, embed, attributes));
      }
    }
insertEmbed ( index , embed , attributes = { } ) { if ( embed . constructor !== Object ) { throw new Error ( 'Embed must be an Object' ) } const y = this . doc ; if ( y !== null ) { transact ( y , transaction => { const pos = findPosition ( transaction , this , index ) ; insertText ( transaction , this , pos , embed , attributes ) ; } ) ; } else { ( this . _pending ) . push ( ( ) => this . insertEmbed ( index , embed , attributes ) ) ; } }
Inserts an embed at a index.
Inserts an embed at a index .
/** @type {Array<function>} */