浏览代码

Fixed API docs.

Maciej Bukowski 5 年之前
父节点
当前提交
c7642d88e5

+ 0 - 3
packages/ckeditor5-engine/src/model/position.js

@@ -146,9 +146,6 @@ export default class Position {
 		return this.path[ this.path.length - 1 ];
 	}
 
-	/**
-	 * @param {Number} newOffset
-	 */
 	set offset( newOffset ) {
 		this.path[ this.path.length - 1 ] = newOffset;
 	}

+ 2 - 0
packages/ckeditor5-engine/src/view/filler.js

@@ -64,6 +64,8 @@ export const INLINE_FILLER_LENGTH = 7;
 
 /**
  * Inline filler which is a sequence of the zero width spaces.
+ *
+ * @type {String}
  */
 export const INLINE_FILLER = ( () => {
 	let inlineFiller = '';

+ 5 - 8
packages/ckeditor5-engine/src/view/text.js

@@ -76,7 +76,9 @@ export default class Text extends Node {
 	}
 
 	/**
-	 * This getter is required when using the addition assignment operator on protected property:
+	 * The `_data` property is controlled by a getter and a setter.
+	 *
+	 * The getter is required when using the addition assignment operator on protected property:
 	 *
 	 *		const foo = downcastWriter.createText( 'foo' );
 	 *		const bar = downcastWriter.createText( 'bar' );
@@ -86,6 +88,8 @@ export default class Text extends Node {
 	 *
 	 * If the protected getter didn't exist, `foo._data` will return `undefined` and result of the merge will be invalid.
 	 *
+	 * The setter sets data and fires the {@link module:engine/view/node~Node#event:change:text change event}.
+	 *
 	 * @protected
 	 * @type {String}
 	 */
@@ -93,13 +97,6 @@ export default class Text extends Node {
 		return this.data;
 	}
 
-	/**
-	 * Sets data and fires the {@link module:engine/view/node~Node#event:change:text change event}.
-	 *
-	 * @protected
-	 * @fires change:text
-	 * @param {String} data New data for the text node.
-	 */
 	set _data( data ) {
 		this._fireChange( 'text', this );
 

+ 1 - 9
packages/ckeditor5-media-embed/src/ui/mediaformview.js

@@ -210,20 +210,12 @@ export default class MediaFormView extends View {
 	 * **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}
 	 * which works one way only and may not represent the actual state of the component in the DOM.
 	 *
-	 * @type {Number}
+	 * @type {String}
 	 */
 	get url() {
 		return this.urlInputView.fieldView.element.value.trim();
 	}
 
-	/**
-	 * Sets the native DOM `value` of the {@link #urlInputView} element.
-	 *
-	 * **Note**: Do not confuse it with the {@link module:ui/inputtext/inputtextview~InputTextView#value}
-	 * which works one way only and may not represent the actual state of the component in the DOM.
-	 *
-	 * @param {String} url
-	 */
 	set url( url ) {
 		this.urlInputView.fieldView.element.value = url.trim();
 	}

+ 2 - 0
packages/ckeditor5-mention/src/ui/domwrapperview.js

@@ -13,6 +13,8 @@ import View from '@ckeditor/ckeditor5-ui/src/view';
  * This class wraps DOM element as a CKEditor5 UI View.
  *
  * It allows to render any DOM element and use it in mentions list.
+ *
+ * @extends {module:ui/view~View}
  */
 export default class DomWrapperView extends View {
 	/**

+ 1 - 1
packages/ckeditor5-typing/src/deletecommand.js

@@ -43,7 +43,7 @@ export default class DeleteCommand extends Command {
 		 *
 		 * @readonly
 		 * @private
-		 * @member {typing.ChangeBuffer} #buffer
+		 * @type {module:typing/utils/changebuffer~ChangeBuffer}
 		 */
 		this._buffer = new ChangeBuffer( editor.model, editor.config.get( 'typing.undoStep' ) );
 	}

+ 3 - 3
packages/ckeditor5-ui/src/editableui/editableuiview.js

@@ -59,7 +59,7 @@ export default class EditableUIView extends View {
 		 * The element which is the main editable element (usually the one with `contentEditable="true"`).
 		 *
 		 * @private
-		 * @member {HTMLElement} #_editableElement
+		 * @type {HTMLElement}
 		 */
 		this._editableElement = editableElement;
 
@@ -68,7 +68,7 @@ export default class EditableUIView extends View {
 		 * the view will not render its {@link #template}.
 		 *
 		 * @private
-		 * @member {Boolean} #_hasExternalElement
+		 * @type {Boolean}
 		 */
 		this._hasExternalElement = !!this._editableElement;
 
@@ -81,7 +81,7 @@ export default class EditableUIView extends View {
 		 * the editable DOM element must remain under the full control of the engine to work properly.
 		 *
 		 * @protected
-		 * @member {module:engine/view/view~View} #isFocused
+		 * @type {module:engine/view/view~View}
 		 */
 		this._editingView = editingView;
 	}

+ 1 - 1
packages/ckeditor5-utils/src/keyboard.js

@@ -77,7 +77,7 @@ export function getCode( key ) {
 
 /**
  * Parses keystroke and returns a keystroke code that will match the code returned by
- * link {@link module:utils/keyboard.getCode} for a corresponding {@link module:utils/keyboard~KeystrokeInfo keystroke info}.
+ * link {@link module:utils/keyboard~getCode} for a corresponding {@link module:utils/keyboard~KeystrokeInfo keystroke info}.
  *
  * The keystroke can be passed in two formats:
  *

+ 0 - 2
packages/ckeditor5-widget/src/utils.js

@@ -44,7 +44,6 @@ export function isWidget( node ) {
 	return !!node.getCustomProperty( 'widget' );
 }
 
-/* eslint-disable max-len */
 /**
  * Converts the given {@link module:engine/view/element~Element} to a widget in the following way:
  *
@@ -91,7 +90,6 @@ export function isWidget( node ) {
  * @param {Boolean} [options.hasSelectionHandle=false] If `true`, the widget will have a selection handle added.
  * @returns {module:engine/view/element~Element} Returns the same element.
  */
-/* eslint-enable max-len */
 export function toWidget( element, writer, options = {} ) {
 	writer.setAttribute( 'contenteditable', 'false', element );
 

+ 1 - 1
packages/ckeditor5-word-count/src/wordcount.js

@@ -20,7 +20,7 @@ import env from '@ckeditor/ckeditor5-utils/src/env';
  * This plugin calculates all words and characters in all {@link module:engine/model/text~Text text nodes} available in the model.
  * It also provides an HTML element that updates its state whenever the editor content is changed.
  *
- * The model's data is first converted to plain text using {@link module:word-count/utils.modelElementToPlainText}.
+ * The model's data is first converted to plain text using {@link module:word-count/utils~modelElementToPlainText}.
  * The number of words and characters in your text are determined based on the created plain text. Please keep in mind
  * that every block in the editor is separated with a newline character, which is included in the calculation.
  *