Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
chibat committed Nov 3, 2023
1 parent e519901 commit a161a3c
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions islands/PostEdit.tsx
Original file line number Diff line number Diff line change
@@ -21,7 +21,6 @@ export default function Edit(props: { post: Post }) {
}

async function displayPreview() {
text.value = textarea.current.value;
sanitizedHtml.value = await trpc.md2html.query({
source: text.value,
});
@@ -51,7 +50,6 @@ export default function Edit(props: { post: Post }) {
Mousetrap(textarea.current).bind(
"mod+enter",
() => {
text.value = textarea.current.value;
save();
},
);
@@ -110,7 +108,7 @@ export default function Edit(props: { post: Post }) {
maxLength={10000}
value={text.value}
autofocus
onChange={(e) => text.value = (e.target as any).value}
onInput={(e) => text.value = (e.target as any).value}
>
</textarea>
)}
4 changes: 1 addition & 3 deletions islands/PostNew.tsx
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@ export default function Post() {
}

async function displayPreview() {
text.value = textarea.current.value;
sanitizedHtml.value = await trpc.md2html.query({
source: text.value,
});
@@ -48,7 +47,6 @@ export default function Post() {
Mousetrap(textarea.current).bind(
"mod+enter",
() => {
text.value = textarea.current.value;
post();
},
);
@@ -108,7 +106,7 @@ export default function Post() {
maxLength={10000}
value={text.value}
autofocus
onChange={(e) => text.value = (e.target as any).value}
onInput={(e) => text.value = (e.target as any).value}
placeholder="Write with markdown"
>
</textarea>

0 comments on commit a161a3c

Please sign in to comment.