This commit is contained in:
Chris Wanstrath 2025-09-21 21:37:27 -07:00
parent 54a4ff6287
commit 890feada1e
2 changed files with 5 additions and 7 deletions

View File

@ -45,13 +45,10 @@ async function readFile(path: string): Promise<CommandOutput> {
const text = await file.text() const text = await file.text()
const rows = countChar(text, "\n") + 1 const rows = countChar(text, "\n") + 1
return { return <textarea class="editor" spellcheck={false} rows={rows} data-path={path}>{text}</textarea>
html: `<textarea class="editor" spellcheck="false" rows=${rows} data-path="${path}">${text}</textarea>`
}
} }
function newFile(path: string): CommandOutput { async function newFile(path: string): Promise<CommandOutput> {
return { return <textarea class="editor" spellcheck={false} rows={1} data-path={path}></textarea>
html: `<textarea class="editor" spellcheck="false" rows=1 data-path="${path}"></textarea>`
}
} }

View File

@ -2,6 +2,7 @@
width: 100%; width: 100%;
background-color: transparent; background-color: transparent;
border: none; border: none;
resize: none;
} }
.editor:focus { .editor:focus {