Browse Source

fix initEditorValue

Yuki Takei 2 years ago
parent
commit
455ecd525b

+ 1 - 1
packages/editor/src/components/playground/PlaygroundController.tsx

@@ -14,7 +14,7 @@ export const PlaygroundController = (): JSX.Element => {
     states.view?.dispatch({
       changes: {
         from: 0,
-        to: states.state?.doc.toString().length,
+        to: states.view.state.doc.toString().length,
         insert: '# Header\n\n- foo\n-bar\n',
       },
     });