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skit/editor-core
bitbucket.org/atlassian/atlassian-frontend-monorepo
@atlaskit/editor-plugin-media-insert
/
dist
/
es2019
/
ui
/
hooks
/
use-focus-editor.js
10 lines
•
277 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
import
{ useCallback }
from
'react'
;
export
const
useFocusEditor
= (
{ editorView }
) => {
const
focusEditor =
useCallback
(
() =>
{
// use setTimeout to run this async after the call
setTimeout
(
() =>
editorView.
focus
(),
0
); }, [editorView]);
return
focusEditor; };