deltaFromInsert(op) {
    let delta = []
    let foundCount = 0
    let opKeys = op ? Object.keys(op) : []
    let lastInsert = 0
    for (let i = 0; i < this.data.len(); i++) {
      for(let j = 0; j < opKeys.length; j++) {
        let opKey = opKeys[j]
        if (this.data.matches(i, opKey)) {
          if (i - lastInsert > 0) delta.push({retain: i - lastInsert})
          let str = op[opKey].value
          let deltaOp = {insert: str}
          let attrs = op[opKey].attributes
          if(attrs) {
            deltaOp.attributes = attrs
          }
          delta.push(deltaOp)
          lastInsert = i + str.length
          foundCount += 1
          if (foundCount >= opKeys.length) {
            return delta
          }
        }
      }
    }
    return delta
  }
Obtain a delta based on an insert operation. Note that this must be run *after* the insert has already
occurred on the replica. This can be used to obtain deltas for updating a local editor based on an op received
from the replica event system.
@param op
@returns {Array}