Replies: 1 comment
-
const [editor, setEditor] = useState<any>();
const focusAndAddText = () => {
if (editor) {
var result ="new value";
var position = editor.getSelection();
editor.executeEdits("", [{range: position, text: result}]);
editor.focus();
}
}
const handleEditorOnMount = (editor: any) => {
setEditor(editor);
}
<Editor
onMount={handleEditorOnMount}
/> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lin-mt
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions