insert(index, content) {
    if (this.doc !== null) {
      transact(this.doc, transaction => {
        typeListInsertGenerics(transaction, this, index, content);
      });
    } else {
      // @ts-ignore _prelimContent is defined because this is not yet integrated
      this._prelimContent.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 {number} index The index to insert content at
@param {Array<YXmlElement|YXmlText>} content The array of content