Jelajahi Sumber

Added docs to Bold and Italic features.

Szymon Kupś 9 tahun lalu
induk
melakukan
ba2c6b7e34

+ 13 - 0
packages/ckeditor5-basic-styles/src/bold.js

@@ -9,11 +9,24 @@ import ButtonController from '../ui/button/button.js';
 import ButtonView from '../ui/button/buttonview.js';
 import ButtonView from '../ui/button/buttonview.js';
 import Model from '../ui/model.js';
 import Model from '../ui/model.js';
 
 
+/**
+ * Bold feature. It requires {@link basicStyles.BoldEngine BoldEngine feature}.
+ * This feature creates also a UI component (`bold` button) and registers `CTRL+B` keystroke.
+ *
+ * @memberOf basicStyles
+ * @extends ckeditor5.Feature
+ */
 export default class Bold extends Feature {
 export default class Bold extends Feature {
+	/**
+	 * @inheritDoc
+	 */
 	static get requires() {
 	static get requires() {
 		return [ BoldEngine ];
 		return [ BoldEngine ];
 	}
 	}
 
 
+	/**
+	 * @inheritDoc
+	 */
 	init() {
 	init() {
 		const editor = this.editor;
 		const editor = this.editor;
 		const t = editor.t;
 		const t = editor.t;

+ 10 - 0
packages/ckeditor5-basic-styles/src/boldengine.js

@@ -10,7 +10,17 @@ import AttributeCommand from '../command/attributecommand.js';
 
 
 const BOLD = 'bold';
 const BOLD = 'bold';
 
 
+/**
+ * Bold feature. It registers `bold` command and introduces `bold` attribute in the model, which renders to the view
+ * as `<strong>` element.
+ *
+ * @memberOf basicStyles
+ * @extends ckeditor5.Feature
+ */
 export default class BoldEngine extends Feature {
 export default class BoldEngine extends Feature {
+	/**
+	 * @inheritDoc
+	 */
 	init() {
 	init() {
 		const editor = this.editor;
 		const editor = this.editor;
 		const data = editor.data;
 		const data = editor.data;

+ 13 - 0
packages/ckeditor5-basic-styles/src/italic.js

@@ -9,11 +9,24 @@ import ButtonController from '../ui/button/button.js';
 import ButtonView from '../ui/button/buttonview.js';
 import ButtonView from '../ui/button/buttonview.js';
 import Model from '../ui/model.js';
 import Model from '../ui/model.js';
 
 
+/**
+ * Italic feature. It requires {@link basicStyles.ItalicEngine ItalicEngine feature}.
+ * This feature creates also a UI component (`italic` button) and registers `CTRL+I` keystroke.
+ *
+ * @memberOf basicStyles
+ * @extends ckeditor5.Feature
+ */
 export default class Italic extends Feature {
 export default class Italic extends Feature {
+	/**
+	 * @inheritDoc
+	 */
 	static get requires() {
 	static get requires() {
 		return [ ItalicEngine ];
 		return [ ItalicEngine ];
 	}
 	}
 
 
+	/**
+	 * @inheritDoc
+	 */
 	init() {
 	init() {
 		const editor = this.editor;
 		const editor = this.editor;
 		const t = editor.t;
 		const t = editor.t;

+ 10 - 0
packages/ckeditor5-basic-styles/src/italicengine.js

@@ -10,7 +10,17 @@ import AttributeCommand from '../command/attributecommand.js';
 
 
 const ITALIC = 'italic';
 const ITALIC = 'italic';
 
 
+/**
+ * Italic feature. It registers `italic` command and introduces `italic` attribute in the model, which renders to the view
+ * as `<em>` element.
+ *
+ * @memberOf basicStyles
+ * @extends ckeditor5.Feature
+ */
 export default class ItalicEngine extends Feature {
 export default class ItalicEngine extends Feature {
+	/**
+	 * @inheritDoc
+	 */
 	init() {
 	init() {
 		const editor = this.editor;
 		const editor = this.editor;
 		const data = editor.data;
 		const data = editor.data;