8
0
Pārlūkot izejas kodu

Docs: Refactored interfaces docs.

Oskar Wróbel 8 gadi atpakaļ
vecāks
revīzija
bbf53737e6

+ 16 - 7
packages/ckeditor5-core/src/editor/utils/dataapimixin.js

@@ -16,19 +16,14 @@
  */
 const DataApiMixin = {
 	/**
-	 * Sets the data in the editor's main root.
-	 *
-	 * @method #setData
-	 * @param {*} data The data to load.
+	 * @inheritDoc
 	 */
 	setData( data ) {
 		this.data.set( data );
 	},
 
 	/**
-	 * Gets the data from the editor's main root.
-	 *
-	 * @method #getData
+	 * @inheritDoc
 	 */
 	getData() {
 		return this.data.get();
@@ -42,3 +37,17 @@ export default DataApiMixin;
  *
  * @interface DataApi
  */
+
+/**
+ * Sets the data in the editor's main root.
+ *
+ * @method #setData
+ * @param {String} data Input data.
+ */
+
+/**
+ * Gets the data from the editor's main root.
+ *
+ * @method #getData
+ * @returns {String} Output data.
+ */

+ 14 - 6
packages/ckeditor5-core/src/editor/utils/elementapimixin.js

@@ -18,18 +18,14 @@ import setDataInElement from '@ckeditor/ckeditor5-utils/src/dom/setdatainelement
  */
 const ElementApiMixin = {
 	/**
-	 * Updates the {@link #element editor element}'s content with the data.
-	 *
-	 * @method #updateElement
+	 * @inheritDoc
 	 */
 	updateElement() {
 		setDataInElement( this.element, this.data.get() );
 	},
 
 	/**
-	 * Loads the data from the {@link #element editor element} to the main root.
-	 *
-	 * @method #loadDataFromElement
+	 * @inheritDoc
 	 */
 	loadDataFromElement() {
 		this.data.set( getDataFromElement( this.element ) );
@@ -50,3 +46,15 @@ export default ElementApiMixin;
  * @readonly
  * @member {HTMLElement} #element
  */
+
+/**
+ * Updates the {@link #element editor element}'s content with the data.
+ *
+ * @method #updateElement
+ */
+
+/**
+ * Loads the data from the {@link #element editor element} to the main root.
+ *
+ * @method #loadDataFromElement
+ */