@@ -6,7 +6,6 @@ import SplitPane from "react-split-pane";
66
77import { getSplitConfig , saveSplitConfig } from "../config.js" ;
88import type { SupportedEngine , SupportedFormat } from "../rendering.js" ;
9- import type EditorPane from "./EditorPane.js" ;
109
1110const EditorLazy = lazy ( ( ) => import ( "./Editor.js" ) ) ;
1211const GraphPaneLazy = lazy ( ( ) => import ( "./GraphPane.js" ) ) ;
@@ -44,7 +43,7 @@ export default class SplitEditor extends Component<
4443 SplitEditorProps ,
4544 SplitEditorState
4645> {
47- #editorPaneRef = createRef < EditorPane > ( ) ;
46+ #editorRef = createRef < monaco . editor . IStandaloneCodeEditor > ( ) ;
4847
4948 constructor ( props : SplitEditorProps ) {
5049 super ( props ) ;
@@ -58,7 +57,7 @@ export default class SplitEditor extends Component<
5857 // Change the value of the underlying monaco instance
5958 // Monaco will call onChange and
6059 // the rest is going to be handled as if the user changed the value by hand
61- this . #editorPaneRef . current ?. loadValue ( dotSrc ) ;
60+ this . #editorRef . current ?. setValue ( dotSrc ) ;
6261 }
6362
6463 dotSourceChanged = ( dotSrc : string ) : void => {
@@ -77,8 +76,6 @@ export default class SplitEditor extends Component<
7776 const s = this . state ;
7877 const p = this . props ;
7978
80- // <EditorPane ref={this.#editorPaneRef} />
81-
8279 return (
8380 < SplitPane
8481 split = "vertical"
@@ -97,6 +94,7 @@ export default class SplitEditor extends Component<
9794 }
9895 >
9996 < EditorLazy
97+ ref = { this . #editorRef}
10098 initialValue = { s . dotSrc }
10199 onChangeValue = { ( ) => [ ] }
102100 onValueError = { n => void n }
0 commit comments