From 8df3231ac954ebcc3cf1c7549cebe8e945f62521 Mon Sep 17 00:00:00 2001 From: ysct <50320444+ysct@users.noreply.github.com> Date: Fri, 28 Jun 2019 08:31:20 +0800 Subject: [PATCH 1/2] Update decouplededitor.js --- src/decouplededitor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/decouplededitor.js b/src/decouplededitor.js index 1604746..a3def21 100644 --- a/src/decouplededitor.js +++ b/src/decouplededitor.js @@ -152,7 +152,7 @@ export default class DecoupledEditor extends Editor { * document.body.appendChild( editor.ui.view.toolbar.element ); * * // Initial data was provided so the editor UI element needs to be added manually to the DOM. - * document.body.appendChild( editor.ui.element ); + * document.body.appendChild( editor.ui.view.editable.element ); * } ) * .catch( err => { * console.error( err.stack ); From 4e77c9a45f8ff919523ed7239cc62f4eedab8f49 Mon Sep 17 00:00:00 2001 From: Aleksander Nowodzinski Date: Fri, 19 Jul 2019 14:50:51 +0200 Subject: [PATCH 2/2] Docs: Used the EditorUI#getEditableElement() in DecoupledEditor class API docs. --- src/decouplededitor.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/decouplededitor.js b/src/decouplededitor.js index 0ea9171..b30e569 100644 --- a/src/decouplededitor.js +++ b/src/decouplededitor.js @@ -152,7 +152,7 @@ export default class DecoupledEditor extends Editor { * document.body.appendChild( editor.ui.view.toolbar.element ); * * // Initial data was provided so the editor UI element needs to be added manually to the DOM. - * document.body.appendChild( editor.ui.view.editable.element ); + * document.body.appendChild( editor.ui.getEditableElement() ); * } ) * .catch( err => { * console.error( err.stack ); @@ -207,7 +207,8 @@ export default class DecoupledEditor extends Editor { * Moreover, the editor data will be set back to the original element once the editor is destroyed. * * If the initial data is passed, a detached editor will be created. In this case you need to insert it into the DOM manually. - * It is available under the {@link module:editor-decoupled/decouplededitorui~DecoupledEditorUI#element `editor.ui.element`} property. + * It is available via + * {@link module:editor-decoupled/decouplededitorui~DecoupledEditorUI#getEditableElement `editor.ui.getEditableElement()`}. * * @param {module:core/editor/editorconfig~EditorConfig} [config] The editor configuration. * @returns {Promise} A promise resolved once the editor is ready. The promise resolves with the created editor instance.