Files
talk/plugins/talk-plugin-rich-text/client/components/rte/lib/api.js
T

15 lines
331 B
JavaScript

import { selectionIsInside } from './dom';
export default class API {
constructor(contentEditable, onChange) {
this.contentEditable = contentEditable;
this.broadcastChange = onChange;
}
isSelectionInside() {
return selectionIsInside(this.contentEditable);
}
focus() {
this.contentEditable.focus();
}
}