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