File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
overmind/namespaces/editor Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ export const internal = internalActions;
19
19
20
20
export const onNavigateAway : Action = ( ) => { } ;
21
21
22
+ export const test : Action < string > = ( { effects } , moduleShortid ) => {
23
+ effects . vscode . changeCode ( moduleShortid , 'hehehe' ) ;
24
+ } ;
25
+
22
26
export const addNpmDependency : AsyncAction < {
23
27
name : string ;
24
28
version ?: string ;
Original file line number Diff line number Diff line change @@ -321,7 +321,14 @@ class VSCodeManager {
321
321
and server requires a full code update
322
322
*/
323
323
changeCode ( moduleShortid : string , code : string ) {
324
- context . monaco . editor . changeCode ( code , moduleShortid ) ;
324
+ try {
325
+ ( window as any ) . CSEditor . editor
326
+ . getActiveCodeEditor ( )
327
+ . getModel ( moduleShortid )
328
+ . setValue ( code ) ;
329
+ } catch ( error ) {
330
+ console . log ( ) ;
331
+ }
325
332
}
326
333
327
334
/**
You can’t perform that action at this time.
0 commit comments