mirror of
https://github.com/silvanocerza/github-gitless-sync.git
synced 2026-07-22 12:10:28 +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%"}
|
width={"100%"}
|
||||||
basicSetup={false}
|
basicSetup={false}
|
||||||
extensions={extensions}
|
extensions={extensions}
|
||||||
|
onChange={(value: string) => {
|
||||||
|
onContentChange(value);
|
||||||
|
}}
|
||||||
onUpdate={(viewUpdate: ViewUpdate) => {
|
onUpdate={(viewUpdate: ViewUpdate) => {
|
||||||
if (viewUpdate.docChanged) {
|
|
||||||
onContentChange(viewUpdate.state.doc.toString());
|
|
||||||
}
|
|
||||||
// We want to know when it updates in case the line height changes
|
// We want to know when it updates in case the line height changes
|
||||||
onEditorUpdate?.(viewUpdate.view);
|
onEditorUpdate?.(viewUpdate.view);
|
||||||
}}
|
}}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue