function defineOperator(name, fn) {
      operators[name] = fn;
    }
An operator acts on a text selection. It receives the list of selections
as input. The corresponding CodeMirror selection is guaranteed to
match the input selection.