Parcourir la source

Docs (ui): Ensured the `EditorUIView` is being rendered in the external UI guide (and demo) to allow using the "body" view collection.

Huge thanks to [Asim Kattum Thazha](https://github.com/asimkt) for this contribution!
Aleksander Nowodzinski il y a 5 ans
Parent
commit
5709826d16

+ 4 - 0
packages/ckeditor5-ui/docs/_snippets/examples/bootstrap-ui-inner.js

@@ -138,6 +138,10 @@ class BootstrapEditorUI extends EditorUI {
 		const view = this.view;
 		const editingView = editor.editing.view;
 
+		// Make sure the EditorUIView is rendered. This will, for instance, create a place for UI elements
+		// like floating panels detached from the main editor UI in DOM.
+		this._view.render();
+
 		// Create an editing root in the editing layer. It will correspond with the
 		// document root created in the constructor().
 		const editingRoot = editingView.document.getRoot();

+ 4 - 0
packages/ckeditor5-ui/docs/framework/guides/external-ui.md

@@ -273,6 +273,10 @@ class BootstrapEditorUI extends EditorUI {
 		const view = this.view;
 		const editingView = editor.editing.view;
 
+		// Make sure the EditorUIView is rendered. This will, for instance, create a place for UI elements
+		// like floating panels detached from the main editor UI in DOM.
+		this._view.render();
+
 		// Create an editing root in the editing layer. It will correspond with the
 		// document root created in the constructor().
 		const editingRoot = editingView.document.getRoot();