mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
run prettier
This commit is contained in:
parent
1aa33634de
commit
8d313a9472
1 changed files with 4 additions and 7 deletions
|
|
@ -8,16 +8,13 @@ export const Editor: VFC = () => {
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (monacoEl) {
|
if (monacoEl) {
|
||||||
setEditor(editor => {
|
setEditor((editor) => {
|
||||||
|
if (editor) return;
|
||||||
if(editor)
|
|
||||||
return;
|
|
||||||
|
|
||||||
return monaco.editor.create(monacoEl.current!, {
|
return monaco.editor.create(monacoEl.current!, {
|
||||||
value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
|
value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
|
||||||
language: 'typescript'
|
language: 'typescript'
|
||||||
})
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue