Always focus editor after pressing buttons in Publish sidebar component

This commit is contained in:
Thomas Nordquist
2020-04-16 11:51:18 +02:00
parent 30af13f793
commit 59737edfb4
3 changed files with 44 additions and 30 deletions

View File

@@ -16,6 +16,7 @@ function Editor(props: {
theme: Theme
value: string | undefined
onChange: (value: string) => void
editorRef: React.Ref<AceEditor>
}) {
const editorOptions = {
showLineNumbers: false,
@@ -24,6 +25,7 @@ function Editor(props: {
return (
<AceEditor
ref={props.editorRef}
style={{}}
mode={props.editorMode}
theme={props.theme.palette.type === 'dark' ? 'monokai' : 'dawn'}