浏览代码

Docs: Introduces EditorWithUI interface + minor docs improvements.

Oskar Wróbel 8 年之前
父节点
当前提交
c97d0b568d

+ 1 - 18
packages/ckeditor5-core/src/editor/editor.js

@@ -124,17 +124,6 @@ export default class Editor {
 		 */
 		this.keystrokes = new EditingKeystrokeHandler( this );
 		this.keystrokes.listenTo( this.editing.view );
-
-		/**
-		 * Editor UI instance.
-		 *
-		 * This property is set by more specialized editor constructors. However, it's required
-		 * for plugins to work (their UI-related part will try to interact with editor UI),
-		 * so every editor class which is meant to work with default plugins should set this property.
-		 *
-		 * @readonly
-		 * @member {module:core/editor/editorui~EditorUI} #ui
-		 */
 	}
 
 	/**
@@ -240,12 +229,6 @@ mix( Editor, ObservableMixin );
  */
 
 /**
- * Fired when the editor UI is ready. This event won't be fired if the editor has no UI.
- *
- * @event uiReady
- */
-
-/**
  * Fired when the data loaded to the editor is ready. If a specific editor doesn't load
  * any data initially, this event will be fired right before {@link #event:ready}.
  *
@@ -253,7 +236,7 @@ mix( Editor, ObservableMixin );
  */
 
 /**
- * Fired when {@link #event:pluginsReady plugins}, {@link #event:uiReady UI} and {@link #event:dataReady data} and all additional
+ * Fired when {@link #event:pluginsReady plugins}, and {@link #event:dataReady data} and all additional
  * editor components are ready.
  *
  * Note: This event is most useful for plugin developers. When integrating the editor with your website or

+ 27 - 0
packages/ckeditor5-core/src/editor/editorwithui.jsdoc

@@ -0,0 +1,27 @@
+/**
+ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
+ * For licensing, see LICENSE.md.
+ */
+
+/**
+ * @module core/editor/editorwithui
+ */
+
+/**
+ * Interface that is required for plugins to work (their UI-related part will try to interact with editor UI).
+ *
+ * @interface EditorWithUI
+ */
+
+/**
+ * Editor UI instance.
+ *
+ * @readonly
+ * @member {module:core/editor/editorui~EditorUI} #ui
+ */
+
+/**
+ * Fired when the editor UI is ready.
+ *
+ * @event uiReady
+ */

+ 7 - 0
packages/ckeditor5-core/src/editor/utils/datainterface.js

@@ -12,6 +12,7 @@
  * using {@link module:core/editor/editor~Editor#data data pipeline}.
  *
  * @mixin DataInterface
+ * @implements module:core/editor/utils/datainterface~Data
  */
 const DataInterface = {
 	/**
@@ -35,3 +36,9 @@ const DataInterface = {
 };
 
 export default DataInterface;
+
+/**
+ * Interface representing classes which mix in {@link module:core/editor/utils/datainterface~DataInterface}.
+ *
+ * @interface Data
+ */

+ 7 - 0
packages/ckeditor5-core/src/editor/utils/elementinterface.js

@@ -14,6 +14,7 @@ import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement
  * Interface provides method for setting and getting data from/to element on which editor has been initialized.
  *
  * @mixin ElementInterface
+ * @implements module:core/editor/utils/elementinterface~Element
  */
 const ElementInterface = {
 	/**
@@ -44,3 +45,9 @@ const ElementInterface = {
 };
 
 export default ElementInterface;
+
+/**
+ * Interface representing classes which mix in {@link module:core/editor/utils/elementinterface~ElementInterface}.
+ *
+ * @interface Element
+ */