feat:add font selection and font wysiwyg
This commit is contained in:
+2
-1
@@ -925,9 +925,10 @@ window.onload = function () {
|
||||
|
||||
// 富文本
|
||||
fontOptionDom.querySelectorAll<HTMLLIElement>('li').forEach(li => li.classList.remove('active'))
|
||||
const curFontDom = fontOptionDom.querySelector<HTMLLIElement>(`[data-family=${payload.font}]`)
|
||||
const curFontDom = fontOptionDom.querySelector<HTMLLIElement>(`[data-family='${payload.font}']`)
|
||||
if (curFontDom) {
|
||||
fontSelectDom.innerText = curFontDom.innerText
|
||||
fontSelectDom.style.fontFamily = payload.font
|
||||
curFontDom.classList.add('active')
|
||||
}
|
||||
payload.bold ? boldDom.classList.add('active') : boldDom.classList.remove('active')
|
||||
|
||||
Reference in New Issue
Block a user