parseAttachmentHtml.js
356 Bytes
export function parseAttachmentHtml(domElem, children, editor) {
const key = domElem.getAttribute('data-key') || ''
const name = domElem.getAttribute('data-name') || ''
// 生成“附件”元素(按照此前约定的数据结构)
const myResume = {
type: 'text',
name,
key,
children: [{ text: '' }]
}
return myResume
}