|
@ -2,13 +2,14 @@ extends @/layout/single-page |
|
|
|
|
|
|
|
|
block head |
|
|
block head |
|
|
link(rel="stylesheet", href="https://unpkg.com/bytemd/dist/index.css") |
|
|
link(rel="stylesheet", href="https://unpkg.com/bytemd/dist/index.css") |
|
|
link(rel="stylesheet", href="https://unpkg.com/github-markdown-css") |
|
|
//- link(rel="stylesheet", href="https://unpkg.com/github-markdown-css") |
|
|
script. |
|
|
script. |
|
|
let process = {} |
|
|
let process = {} |
|
|
process.env = {} |
|
|
process.env = {} |
|
|
process.env.NODE_ENV = 'production' |
|
|
process.env.NODE_ENV = 'production' |
|
|
script(src="https://unpkg.com/bytemd") |
|
|
script(src="https://unpkg.com/bytemd") |
|
|
script(src="https://unpkg.com/@bytemd/plugin-gfm") |
|
|
script(src="https://unpkg.com/@bytemd/plugin-gfm") |
|
|
|
|
|
script(src="https://unpkg.com/bytemd@1.21.0/locales/zh_Hans.json") |
|
|
|
|
|
|
|
|
block page |
|
|
block page |
|
|
include @/helper/flush.pug |
|
|
include @/helper/flush.pug |
|
@ -22,10 +23,15 @@ block page |
|
|
target: document.getElementById('root'), |
|
|
target: document.getElementById('root'), |
|
|
props: { |
|
|
props: { |
|
|
value: '# heading\n\nparagraph\n\n> blockquote', |
|
|
value: '# heading\n\nparagraph\n\n> blockquote', |
|
|
|
|
|
//- locale: "https://unpkg.com/bytemd@1.21.0/locales/zh_Hans.json", |
|
|
|
|
|
locale: "zh_Hans.json", |
|
|
plugins, |
|
|
plugins, |
|
|
}, |
|
|
}, |
|
|
}) |
|
|
}) |
|
|
|
|
|
setTimeout(()=>{ |
|
|
|
|
|
let el = document.querySelector(".bytemd-preview") |
|
|
|
|
|
el.classList.add("content") |
|
|
|
|
|
}) |
|
|
editor.$on('change', (e) => { |
|
|
editor.$on('change', (e) => { |
|
|
editor.$set({ value: e.detail.value }) |
|
|
editor.$set({ value: e.detail.value }) |
|
|
}) |
|
|
}) |
|
|