mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 09:20:10 +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(() => {
|
||||
if (monacoEl) {
|
||||
setEditor(editor => {
|
||||
|
||||
if(editor)
|
||||
return;
|
||||
|
||||
setEditor((editor) => {
|
||||
if (editor) return;
|
||||
|
||||
return monaco.editor.create(monacoEl.current!, {
|
||||
value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
|
||||
language: 'typescript'
|
||||
})
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue