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 rows = countChar(text, "\n") + 1
return {
html: `<textarea class="editor" spellcheck="false" rows=${rows} data-path="${path}">${text}</textarea>`
}
return <textarea class="editor" spellcheck={false} rows={rows} data-path={path}>{text}</textarea>
}
function newFile(path: string): CommandOutput {
return {
html: `<textarea class="editor" spellcheck="false" rows=1 data-path="${path}"></textarea>`
}
async function newFile(path: string): Promise<CommandOutput> {
return <textarea class="editor" spellcheck={false} rows={1} data-path={path}></textarea>
}

View File

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