Parcourir la source

Extended documentation of InlineEditableUIView and EditableUIView classes.

Aleksander Nowodzinski il y a 9 ans
Parent
commit
197a9a064f

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

@@ -15,9 +15,9 @@ export default class EditableUIView extends View {
 	/**
 	 * Creates an instance of the EditableUIView class.
 	 *
-	 * @param {ui.Model} model (View)Model of this view.
+	 * @param {utils.Observable} model (View)Model of this View.
 	 * @param {utils.Locale} [locale] The {@link ckeditor5.Editor#locale editor's locale} instance.
-	 * @param {HTMLElement} [editableElement] The editable element. If not specified the editable UI view
+	 * @param {HTMLElement} [editableElement] The editable element. If not specified, this View
 	 * should create it. Otherwise, the existing element should be used.
 	 */
 	constructor( model, locale, editableElement ) {
@@ -41,6 +41,10 @@ export default class EditableUIView extends View {
 		};
 	}
 
+	/**
+	 * Initializes the View by either applying the {@link template} to the existing
+	 * {@link editableElement} or assigns {@link element} as {@link editableElement}.
+	 */
 	init() {
 		if ( this.editableElement ) {
 			this.applyTemplateToElement( this.editableElement, this.template );
@@ -52,6 +56,8 @@ export default class EditableUIView extends View {
 	}
 
 	destroy() {
+		super.destroy();
+
 		this.editableElement.contentEditable = false;
 	}
 
@@ -59,6 +65,6 @@ export default class EditableUIView extends View {
 	 * The element which is the main editable element (usually the one with `contentEditable="true"`).
 	 *
 	 * @readonly
-	 * @member {HTMLElement} ui.editable.EditableUIView#editableElement
+	 * @member {HTMLElement} ui.editableUI.EditableUIView#editableElement
 	 */
 }

+ 14 - 0
packages/ckeditor5-ui/src/editableui/inline/inlineeditableuiview.js

@@ -7,7 +7,21 @@
 
 import EditableUIView from '/ckeditor5/ui/editableui/editableuiview.js';
 
+/**
+ * The class implementing an inline {@link ui.editableUI.EditableUIView}.
+ *
+ * @memberOf ui.editableUI.inline
+ * @extends ui.editableUI.EditableUIView
+ */
 export default class InlineEditableUIView extends EditableUIView {
+	/**
+	 * Creates an instance of the InlineEditableUIView class.
+	 *
+	 * @param {utils.Observable} model (View)Model of this View.
+	 * @param {utils.Locale} [locale] The {@link ckeditor5.Editor#locale editor's locale} instance.
+	 * @param {HTMLElement} [editableElement] The editable element. If not specified, the {@link EditableUIView}
+	 * should create it. Otherwise, the existing element should be used.
+	 */
 	constructor( model, locale, editableElement ) {
 		super( model, locale, editableElement );