Commit 35ba9b8b by qlintonger xeno

Merge remote-tracking branch 'origin/master'

parents 133b68f0 bdf9aa2b
......@@ -5,8 +5,6 @@ const elemToHtml = (type: string) => {
const dataKey = (elem as any).dataKey || ''
return `<${type}
data-w-e-type="${type}"
data-w-e-is-void
data-w-e-is-inline
data-key="${dataKey}"
>${childrenHtml}</${type}>`
}
......
......@@ -20,8 +20,7 @@ export const handleEditor = (editor: IDomEditor) => {
export const nodeProps = ({ option }: { option: TreeOption }) => {
return {
onClick() {
console.log(editorRef.value?.editorRef.getEditableContainer())
editorRef.value?.editorRef.scrollToElem(['w-e-element-124'])
editorRef.value?.editorRef.scrollToElem([option.key])
}
}
}
......@@ -4,7 +4,7 @@ import { IDomEditor, IModuleConf, SlateElement } from '@wangeditor/editor'
const renderElem = (type: string, style = { display: 'block' }) => {
return (elem: SlateElement, children: VNode[] | null, editor: IDomEditor): VNode => {
const dataKey = (elem as any).dataKey
return h(type, { style, props: { id: dataKey } }, children)
return h(type, { style, attrs: { dataKey: dataKey } }, children)
}
}
const createRenderConfig = (types: string | string[]) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment