document 提供了 execCommand() 方法,该方法会影响使用 designMode 或 contentEditable 属性实现可编辑区域的元素。...('StyleWithCSS', true, true)
document.execCommand('Bold', false, val)
}
// 斜体
const italic...= (val) => {
document.execCommand('StyleWithCSS', true, true)
document.execCommand('italic',...=> {
document.execCommand('StyleWithCSS', true, true)
document.execCommand('italic', false, val..."editor"].document.execCommand('StyleWithCSS', true, true)
frames["editor"].document.execCommand(