8
0
Pārlūkot izejas kodu

Docs: API docs and readme corrected. [skip ci]

Anna Tomanek 6 gadi atpakaļ
vecāks
revīzija
cfbecdd7e2

+ 3 - 3
packages/ckeditor5-horizontal-line/README.md

@@ -8,15 +8,15 @@ CKEditor 5 horizontal line feature
 [![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-horizontal-line/status.svg)](https://david-dm.org/ckeditor/ckeditor5-horizontal-line)
 [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-horizontal-line/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-horizontal-line?type=dev)
 
-This package implements horizontal line feature for CKEditor 5.
+This package implements the horizontal line feature for CKEditor 5.
 
 ## Demo
 
-Check out the demo in the [Horizontal Line feature](https://ckeditor.com/docs/ckeditor5/latest/features/horizontal-line.html) guide.
+Check out the demo in the [Horizontal line feature](https://ckeditor.com/docs/ckeditor5/latest/features/horizontal-line.html) guide.
 
 ## Documentation
 
-See the [`@ckeditor/ckeditor5-horizontal-line` package](https://ckeditor.com/docs/ckeditor5/latest/api/horizontal-line.html) page in [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
+See the [`@ckeditor/ckeditor5-horizontal-line` package](https://ckeditor.com/docs/ckeditor5/latest/api/horizontal-line.html) page as well as the [Horizontal line feature guide](https://ckeditor.com/docs/ckeditor5/latest/features/horizontal-line.html) in [CKEditor 5 documentation](https://ckeditor.com/docs/ckeditor5/latest/).
 
 ## License
 

+ 5 - 1
packages/ckeditor5-horizontal-line/src/horizontalline.js

@@ -12,7 +12,11 @@ import HorizontalLineEditing from './horizontallineediting';
 import HorizontalLineUI from './horizontallineui';
 
 /**
- * The horizontal line plugin provides a possibility to insert a horizontal line in the rich-text editor.
+ * The horizontal line feature.
+ *
+ * It provides the possibility to insert a horizontal line into the rich-text editor.
+ *
+ * For a detailed overview, check the {@glink features/horizontal-line Horizontal line feature} documentation.
  *
  * @extends module:core/plugin~Plugin
  */

+ 8 - 7
packages/ckeditor5-horizontal-line/src/horizontallinecommand.js

@@ -11,11 +11,11 @@ import Command from '@ckeditor/ckeditor5-core/src/command';
 import { findOptimalInsertionPosition } from '@ckeditor/ckeditor5-widget/src/utils';
 
 /**
- * The insert a horizontal line command.
+ * The horizontal line command.
  *
- * The command is registered by the {@link module:horizontal-line/horizontallineediting~HorizontalLineEditing} as `'horizontalLine'`.
+ * The command is registered by {@link module:horizontal-line/horizontallineediting~HorizontalLineEditing} as `'horizontalLine'`.
  *
- * To insert the horizontal line at the current selection, execute the command:
+ * To insert a horizontal line at the current selection, execute the command:
  *
  *		editor.execute( 'horizontalLine' );
  *
@@ -62,7 +62,7 @@ export default class HorizontalLineCommand extends Command {
 	}
 }
 
-// Checks if the `horizontalLine` element can be inserted at current model selection.
+// Checks if the `horizontalLine` element can be inserted at the current model selection.
 //
 // @param {module:engine/model/model~Model} model
 // @returns {Boolean}
@@ -74,7 +74,7 @@ function isHorizontalLineAllowed( model ) {
 		!checkSelectionOnObject( selection, schema );
 }
 
-// Checks if horizontal line is allowed by schema in optimal insertion parent.
+// Checks if a horizontal line is allowed by the schema in the optimal insertion parent.
 //
 // @param {module:engine/model/selection~Selection|module:engine/model/documentselection~DocumentSelection} selection
 // @param {module:engine/model/schema~Schema} schema
@@ -86,7 +86,7 @@ function isHorizontalLineAllowedInParent( selection, schema, model ) {
 	return schema.checkChild( parent, 'horizontalLine' );
 }
 
-// Check if selection is on object.
+// Checks if the selection is on object.
 //
 // @param {module:engine/model/selection~Selection|module:engine/model/documentselection~DocumentSelection} selection
 // @param {module:engine/model/schema~Schema} schema
@@ -97,7 +97,8 @@ function checkSelectionOnObject( selection, schema ) {
 	return selectedElement && schema.isObject( selectedElement );
 }
 
-// Returns a node that will be used to insert horizontal line with `model.insertContent` to check if horizontal line can be placed there.
+// Returns a node that will be used to insert a horizontal line with `model.insertContent` to check if the horizontal line can be
+// placed there.
 //
 // @param {module:engine/model/selection~Selection|module:engine/model/documentselection~DocumentSelection} selection
 // @param {module:engine/model/model~Model} model Model instance.

+ 2 - 2
packages/ckeditor5-horizontal-line/src/horizontallineui.js

@@ -21,7 +21,7 @@ export default class HorizontalLineUI extends Plugin {
 		const editor = this.editor;
 		const t = editor.t;
 
-		// Add horizontalLine button to feature components.
+		// Add the `horizontalLine` button to feature components.
 		editor.ui.componentFactory.add( 'horizontalLine', locale => {
 			const command = editor.commands.get( 'horizontalLine' );
 			const view = new ButtonView( locale );
@@ -34,7 +34,7 @@ export default class HorizontalLineUI extends Plugin {
 
 			view.bind( 'isEnabled' ).to( command, 'isEnabled' );
 
-			// Execute command.
+			// Execute the command.
 			this.listenTo( view, 'execute', () => editor.execute( 'horizontalLine' ) );
 
 			return view;