import { TextSelection } from '@atlaskit/editor-prosemirror/state';
export function setTextSelection(view, anchor, head) {
  var state = view.state,
    dispatch = view.dispatch;
  var tr = state.tr.setSelection(TextSelection.create(state.doc, anchor, head));
  dispatch(tr);
}