ui: add cordis

This commit is contained in:
undefined committed 2023-02-28 08:54:58 +08:00
1 parent 6d6c57ef9b
commit 73d872b238
7 files changed
+110 -107

No files matched your search

@@ -2,6 +2,7 @@ import type * as monaco from 'monaco-editor';
import React from 'react';
import { connect } from 'react-redux';
import { load } from 'vj/components/monaco/loader';
import { ctx } from 'vj/context';
interface ScratchpadOptions {
value?: string;
@@ -59,7 +60,7 @@ export default connect((state: any) => ({
);
(window as any).editor = this.editor;
(window as any).monaco = monaco;
window.Hydro.bus.emit('scratchpadEditorCreate', this.editor, monaco);
ctx.scratchpad.init(this.editor, monaco);
}
}