|
|
@@ -17,6 +17,34 @@ import enableToolbarKeyboardFocus from '@ckeditor/ckeditor5-ui/src/toolbar/enabl
|
|
|
*/
|
|
|
export default class BalloonEditorUI extends EditorUI {
|
|
|
/**
|
|
|
+ * Creates an instance of the balloon editor UI class.
|
|
|
+ *
|
|
|
+ * @param {module:core/editor/editor~Editor} editor The editor instance.
|
|
|
+ * @param {module:ui/editorui/editoruiview~EditorUIView} view The view of the UI.
|
|
|
+ */
|
|
|
+ constructor( editor, view ) {
|
|
|
+ super( editor );
|
|
|
+
|
|
|
+ /**
|
|
|
+ * The main (top–most) view of the editor UI.
|
|
|
+ *
|
|
|
+ * @private
|
|
|
+ * @member {module:ui/editorui/editoruiview~EditorUIView} #_view
|
|
|
+ */
|
|
|
+ this._view = view;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * The main (top–most) view of the editor UI.
|
|
|
+ *
|
|
|
+ * @readonly
|
|
|
+ * @member {module:ui/editorui/editoruiview~EditorUIView} #view
|
|
|
+ */
|
|
|
+ get view() {
|
|
|
+ return this._view;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* @inheritDoc
|
|
|
*/
|
|
|
get element() {
|
|
|
@@ -24,6 +52,13 @@ export default class BalloonEditorUI extends EditorUI {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * @inheritDoc
|
|
|
+ */
|
|
|
+ getEditableElement( rootName = 'main' ) {
|
|
|
+ return this.view.editable.name === rootName ? this.view.editable : null;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* Initializes the UI.
|
|
|
*/
|
|
|
init() {
|