UNPKG

@atlaskit/editor-plugin-media-insert

Version:

Media Insert plugin for @atlaskit/editor-core

11 lines 351 B
import { useCallback } from 'react'; export var useFocusEditor = function useFocusEditor(_ref) { var editorView = _ref.editorView; var focusEditor = useCallback(function () { // use setTimeout to run this async after the call setTimeout(function () { return editorView.focus(); }, 0); }, [editorView]); return focusEditor; };