fix: move all child nodes within EditorContent
This commit is contained in:
@@ -55,7 +55,7 @@ export class PureEditorContent extends React.Component<EditorContentProps, Edito
|
|||||||
|
|
||||||
const element = this.editorContentRef.current
|
const element = this.editorContentRef.current
|
||||||
|
|
||||||
element.appendChild(editor.options.element.firstChild)
|
element.append(...editor.options.element.childNodes)
|
||||||
|
|
||||||
editor.setOptions({
|
editor.setOptions({
|
||||||
element,
|
element,
|
||||||
@@ -89,7 +89,7 @@ export class PureEditorContent extends React.Component<EditorContentProps, Edito
|
|||||||
|
|
||||||
const newElement = document.createElement('div')
|
const newElement = document.createElement('div')
|
||||||
|
|
||||||
newElement.appendChild(editor.options.element.firstChild)
|
newElement.append(...editor.options.element.childNodes)
|
||||||
|
|
||||||
editor.setOptions({
|
editor.setOptions({
|
||||||
element: newElement,
|
element: newElement,
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export const EditorContent: Component = {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
element.appendChild(editor.options.element.firstChild)
|
element.append(...editor.options.element.childNodes)
|
||||||
editor.contentComponent = this
|
editor.contentComponent = this
|
||||||
|
|
||||||
editor.setOptions({
|
editor.setOptions({
|
||||||
@@ -62,7 +62,7 @@ export const EditorContent: Component = {
|
|||||||
|
|
||||||
const newElement = document.createElement('div')
|
const newElement = document.createElement('div')
|
||||||
|
|
||||||
newElement.appendChild(editor.options.element.firstChild)
|
newElement.append(...editor.options.element.childNodes)
|
||||||
|
|
||||||
editor.setOptions({
|
editor.setOptions({
|
||||||
element: newElement,
|
element: newElement,
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ export const EditorContent = defineComponent({
|
|||||||
|
|
||||||
const element = unref(rootEl.value)
|
const element = unref(rootEl.value)
|
||||||
|
|
||||||
rootEl.value.appendChild(editor.options.element.firstChild)
|
rootEl.value.append(...editor.options.element.childNodes)
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
editor.contentComponent = instance.ctx._
|
editor.contentComponent = instance.ctx._
|
||||||
@@ -71,7 +71,7 @@ export const EditorContent = defineComponent({
|
|||||||
|
|
||||||
const newElement = document.createElement('div')
|
const newElement = document.createElement('div')
|
||||||
|
|
||||||
newElement.appendChild(editor.options.element.firstChild)
|
newElement.append(...editor.options.element.childNodes)
|
||||||
|
|
||||||
editor.setOptions({
|
editor.setOptions({
|
||||||
element: newElement,
|
element: newElement,
|
||||||
|
|||||||
Reference in New Issue
Block a user