(markdown) use plugin svg code copy

This commit is contained in:
Julien Calixte
2021-08-15 13:26:04 +02:00
parent b87c9552fe
commit 375dc75c62

View File

@@ -2,6 +2,7 @@ import MarkdownIt from 'markdown-it'
import markdownItClass from '@toycode/markdown-it-class'
import blockEmbedPlugin from 'markdown-it-block-embed'
import markdownItCheckbox from 'markdown-it-checkbox'
import markdownItSvgCodeCopy from 'markdown-it-svg-code-copy'
const md = new MarkdownIt({
typographer: true,
@@ -22,6 +23,14 @@ const md = new MarkdownIt({
}
})
.use(markdownItCheckbox)
.use(markdownItSvgCodeCopy, {
svg: `<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="36" height="36" viewBox="0 0 24 24" stroke-width="1.5" stroke="#2c3a47" fill="none" stroke-linecap="round" stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
<rect x="8" y="8" width="10" height="10" rx="2" />
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2" />
</svg>`,
buttonClass: 'button is-light'
})
export const useMarkdown = () => {
return {