Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 1db885d

Browse files
committed
Remove unnecessary react
1 parent c83dfd5 commit 1db885d

File tree

6 files changed

+13
-29
lines changed

6 files changed

+13
-29
lines changed

examples/feature-apps/monaco-editor/App.tsx

Lines changed: 0 additions & 21 deletions
This file was deleted.

examples/feature-apps/monaco-editor/editor.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export function createEditor(container: HTMLElement, readOnly?: boolean) {
3232
contextmenu: true,
3333
fontSize: 14,
3434
lineHeight: 18,
35+
lineNumbersMinChars: 2,
3536
minimap: { enabled: false },
3637
scrollBeyondLastLine: false,
3738
smoothScrolling: true,

examples/feature-apps/monaco-editor/index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
width: 100vw;
2626
height: 100vh;
2727
padding: 50px;
28-
border: 1px solid #eee;
2928
}
3029
#root .editor {
3130
width: 100%;
@@ -35,8 +34,10 @@
3534
</head>
3635

3736
<body>
38-
<div id="root" data-ssr-root></div>
39-
<script type="module" src="./main.tsx"></script>
37+
<div id="root">
38+
<div class="editor"><span style="color:darkgray;">loading...</span></div>
39+
</div>
40+
<script type="module" src="./main.ts"></script>
4041
</body>
4142

4243
</html>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import { createEditor, createModel } from "./editor.ts";
2+
3+
const el = document.querySelector(".editor");
4+
const editor = createEditor(el as HTMLElement);
5+
const model = createModel("mod.ts", `// Monaco Editor x Aleph.js (SPA mode) \n\nconsole.log("Hello, world!");\n`);
6+
7+
el!.innerHTML = "";
8+
editor.setModel(model);

examples/feature-apps/monaco-editor/main.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)