mirror of
https://litchi.icu/ngc2207/judge.git
synced 2025-05-18 20:56:33 +00:00
feat: add onChange handler to post editor content to parent window
This commit is contained in:
parent
79cbc92a87
commit
6a88409a32
@ -58,6 +58,14 @@ function App() {
|
||||
beforeMount={async (monaco: Monaco) => {
|
||||
shikiToMonaco(await highlighter, monaco);
|
||||
}}
|
||||
onChange={(value) => {
|
||||
if (value !== undefined) {
|
||||
window.parent.postMessage(
|
||||
{ type: "editor-info", language, code: value },
|
||||
"*"
|
||||
);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</TabsContent>
|
||||
<TabsContent value="diff-editor" className="h-full">
|
||||
|
Loading…
Reference in New Issue
Block a user