code: function makeChange(doc, change, selUpdate, ignoreReadOnly) {
      if (doc.cm) {
        if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, selUpdate, ignoreReadOnly);
        if (doc.cm.state.suppressEdits) return;
      }
  
      if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) {
        change = filterChange(doc, change);
        if (!change) return;
      }
  
      // Possibly split or suppress the update based on the presence
      // of read-only spans in its range.
      var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to);
      if (split) {
        for (var i = split.length - 1; i >= 1; --i)
          makeChangeNoReadonly(doc, {from: split[i].from, to: split[i].to, text: [""]});
        if (split.length)
          makeChangeNoReadonly(doc, {from: split[0].from, to: split[0].to, text: change.text}, selUpdate);
      } else {
        makeChangeNoReadonly(doc, change, selUpdate);
      }
    }
docs: Replace the range from from to to by the strings in replacement. change is a {from, to, text [, origin]} object