feat: video on markdown

This commit is contained in:
oat_dev 2024-07-03 17:47:34 +07:00
parent 2e7f77625a
commit 6a90488d0a
4 changed files with 26 additions and 3 deletions

View file

@ -8,10 +8,18 @@ import mditFigureWithPCaption from "markdown-it-image-figures";
import mditAnchor from "markdown-it-anchor";
import { useManualStore } from "@/stores/manual";
import { storeToRefs } from "pinia";
// @ts-expect-error
import mditVideo from "markdown-it-video";
const md = new MarkdownIt().use(mditAnchor).use(mditFigureWithPCaption, {
figcaption: "alt",
});
const md = new MarkdownIt()
.use(mditAnchor)
.use(mditVideo)
.use(mditFigureWithPCaption, {
figcaption: "alt",
html: true,
linkify: true,
typography: true,
});
const route = useRoute();
const manual = useManualStore();