Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanThatOneKid committed Apr 3, 2024
1 parent 24b2b2b commit 92d7afa
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions static/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,7 @@ async function transform(options) {

let monacoEditor;

function setMonacoTSConfig(version) {
monaco.languages.typescript.javascriptDefaults.setCompilerOptions(
makeTSConfig(version),
);
}

function createEditor(options) {
monaco.editor.defineTheme("jsonx", {
base: "vs-dark",
inherit: true,
// TODO: Figure out how to change fontFamily.
rules: [
{ token: "", foreground: "#ffffff" },
],
colors: {
"editor.foreground": "#ffffff",
},
});

// TODO: Figure out how to set up TypeScript intellisense.
setMonacoTSConfig(options.version);

// TODO: Figure out how to resolve this error.
//
// codicon.ttf:1
Expand All @@ -61,14 +40,15 @@ function createEditor(options) {
monacoEditor = monaco.editor.create(
options.target,
{
theme: "jsonx",
theme: "vs-dark",
fontSize: 18,
model: monaco.editor.createModel(
options.code,
"typescript",
monaco.Uri.parse("inmemory://model/main.tsx"),
),
// TODO: Figure out how to paste content into the editor.
// TODO: Figure out how to change fontFamily.
},
);

Expand Down

0 comments on commit 92d7afa

Please sign in to comment.