Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
render note preview with MathJax
Browse files Browse the repository at this point in the history
  • Loading branch information
TaiSakuma committed Sep 21, 2023
1 parent 1a18cf9 commit 3a76440
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/product/form/start/Note.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
>
<v-textarea
variant="outlined"
hint="Note will be parsed as Markdown"
hint="Note will be parsed as Markdown. Math expressions are rendered with MathJax ($ and $$ are delimiters for inline and display math, respectively)."
persistent-hint
rows="6"
:model-value="note"
Expand All @@ -22,12 +22,11 @@
</v-window-item>
<v-window-item
value="preview"
v-html="noteMarked"
style="min-height: 180px; width: 98%; border: solid 1px"
:transition="false"
:reverse-transition="false"
class="markdown-body px-3 py-3"
>
<note :markdown="note"></note>
</v-window-item>
</v-window>
</template>
Expand All @@ -36,6 +35,8 @@
import { ref, computed, watchEffect } from "vue";
import { marked } from "marked";
import Note from "@/components/product/item-card/note/Note.vue";
interface Props {
modelValue: string;
}
Expand Down

0 comments on commit 3a76440

Please sign in to comment.