mirror of
https://github.com/yudaocode/yudao-ui-admin-vue3.git
synced 2026-04-19 15:48:39 +00:00
feat: 通过wangeditor自定义打印模板
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import { DOMElement } from './utils/dom'
|
||||
import { IDomEditor, SlateDescendant, SlateElement } from '@wangeditor/editor'
|
||||
|
||||
function parseHtml(
|
||||
elem: DOMElement,
|
||||
children: SlateDescendant[],
|
||||
editor: IDomEditor
|
||||
): SlateElement {
|
||||
return {
|
||||
type: 'process-record',
|
||||
children: [{ text: '' }],
|
||||
}
|
||||
}
|
||||
|
||||
const parseHtmlConf = {
|
||||
selector: 'span[data-w-e-type="process-record"]',
|
||||
parseElemHtml: parseHtml,
|
||||
}
|
||||
|
||||
export default parseHtmlConf
|
||||
Reference in New Issue
Block a user