mirror of
https://github.com/silvanocerza/github-gitless-sync.git
synced 2026-07-22 05:41:36 +00:00
Move editor content change callback
This commit is contained in:
parent
165f2d277d
commit
b5ebe4a638
1 changed files with 3 additions and 3 deletions
|
|
@ -55,10 +55,10 @@ const EditorPane: React.FC<EditorPaneProps> = (props) => {
|
|||
width={"100%"}
|
||||
basicSetup={false}
|
||||
extensions={extensions}
|
||||
onChange={(value: string) => {
|
||||
onContentChange(value);
|
||||
}}
|
||||
onUpdate={(viewUpdate: ViewUpdate) => {
|
||||
if (viewUpdate.docChanged) {
|
||||
onContentChange(viewUpdate.state.doc.toString());
|
||||
}
|
||||
// We want to know when it updates in case the line height changes
|
||||
onEditorUpdate?.(viewUpdate.view);
|
||||
}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue