✨ (youtube) imbedded videos
This commit is contained in:
@@ -1,18 +1,26 @@
|
|||||||
import MarkdownIt from 'markdown-it'
|
import MarkdownIt from 'markdown-it'
|
||||||
import markdownItClass from '@toycode/markdown-it-class'
|
import markdownItClass from '@toycode/markdown-it-class'
|
||||||
|
import blockEmbedPlugin from 'markdown-it-block-embed'
|
||||||
|
import { NOTE_WIDTH } from '@/constants/note-width'
|
||||||
|
|
||||||
const md = new MarkdownIt({
|
const md = new MarkdownIt({
|
||||||
typographer: true,
|
typographer: true,
|
||||||
quotes: ['«\xA0', '\xA0»', '‹\xA0', '\xA0›']
|
quotes: ['«\xA0', '\xA0»', '‹\xA0', '\xA0›']
|
||||||
}).use(markdownItClass, {
|
|
||||||
h1: ['title', 'is-2'],
|
|
||||||
h2: ['title', 'is-3'],
|
|
||||||
h3: ['title', 'is-4'],
|
|
||||||
h4: ['title', 'is-5'],
|
|
||||||
h5: ['title', 'is-6'],
|
|
||||||
h6: ['title', 'is-6'],
|
|
||||||
table: ['table', 'is-striped', 'is-hoverable']
|
|
||||||
})
|
})
|
||||||
|
.use(markdownItClass, {
|
||||||
|
h1: ['title', 'is-2'],
|
||||||
|
h2: ['title', 'is-3'],
|
||||||
|
h3: ['title', 'is-4'],
|
||||||
|
h4: ['title', 'is-5'],
|
||||||
|
h5: ['title', 'is-6'],
|
||||||
|
h6: ['title', 'is-6'],
|
||||||
|
table: ['table', 'is-striped', 'is-hoverable']
|
||||||
|
})
|
||||||
|
.use(blockEmbedPlugin, {
|
||||||
|
youtube: {
|
||||||
|
width: NOTE_WIDTH - 80
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
export const useMarkdown = () => {
|
export const useMarkdown = () => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user