🐛 Fix #1
This commit is contained in:
parent
2acf37c827
commit
21cba5fd76
|
@ -81,6 +81,9 @@
|
|||
<button onclick="window.vditor.setTheme('light', 'light', 'github');document.querySelector('body').style.backgroundColor=''">
|
||||
Light Mode
|
||||
</button>
|
||||
<button onclick="console.log(window.vditor.getHTML());">
|
||||
GetHTML
|
||||
</button>
|
||||
<select autocomplete="off" onchange="setLang(this.value)">
|
||||
<option selected="selected" value="zh_CN">zh_CN</option>
|
||||
<option value="zh_TW">zh_TW</option>
|
||||
|
|
|
@ -137,3 +137,4 @@ window.setLang = (language) => {
|
|||
window.vditor.destroy()
|
||||
initVditor(language)
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,8 @@ export const haloRender = (element: (HTMLElement | Document) = document, cdn = C
|
|||
addStyle(`${cdn}/dist/js/halo/index.css`, "VditorHaloRenderStyle")
|
||||
addScript(`${cdn}/dist/js/halo/index.js`, "VditorHaloRender").then(() => {
|
||||
haloElement.forEach(el => {
|
||||
el.outerHTML = HaloJs.renderHalo(el.textContent)
|
||||
// 修补code外框
|
||||
el.parentElement.outerHTML = HaloJs.renderHalo(haloRenderAdapter.getCode(el))
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue