insertAfter(ref, content) {
    if (this.doc !== null) {
      transact(this.doc, transaction => {
        const refItem = ref && ref instanceof AbstractType ? ref._item : ref;
        typeListInsertGenericsAfter(transaction, this, refItem, content);
      });
    } else {
      const pc =
      /** @type {Array<any>} */
      this._prelimContent;
      const index = ref === null ? 0 : pc.findIndex(el => el === ref) + 1;

      if (index === 0 && ref !== null) {
        throw error.create('Reference item not found');
      }

      pc.splice(index, 0, ...content);
    }
  }
Inserts new content at an index.

@example
 // Insert character 'a' at position 0
 xml.insert(0, [new Y.XmlText('text')])

@param {null|Item|YXmlElement|YXmlText} ref The index to insert content at
@param {Array<YXmlElement|YXmlText>} content The array of content