瀏覽代碼

Documentation corrections for the Enter feature.

Anna Tomanek 9 年之前
父節點
當前提交
b1bf6596bb

+ 1 - 1
packages/ckeditor5-enter/CONTRIBUTING.md

@@ -1,4 +1,4 @@
 Contributing
 ========================================
 
-Information about contributing can be found at the following page: <https://github.com/ckeditor/ckeditor5/blob/master/CONTRIBUTING.md>.
+Information about contributing can be found on the following page: <https://github.com/ckeditor/ckeditor5/blob/master/CONTRIBUTING.md>.

+ 1 - 1
packages/ckeditor5-enter/README.md

@@ -3,7 +3,7 @@ CKEditor 5 Enter Feature
 
 [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-enter/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-enter#info=devDependencies)
 
-Enter feature for CKEditor 5. More information about the project can be found at the following url: <https://github.com/ckeditor/ckeditor5-enter>.
+The Enter feature for CKEditor 5. More information about the project can be found at the following URL: <https://github.com/ckeditor/ckeditor5-enter>.
 
 ## License
 

+ 2 - 2
packages/ckeditor5-enter/src/enter.js

@@ -8,7 +8,7 @@ import EnterCommand from './entercommand.js';
 import EnterObserver from './enterobserver.js';
 
 /**
- * The enter feature. Handles the <kbd>Enter</kbd> and <kbd>Shift + Enter</kbd> keys in the editor.
+ * The Enter feature. Handles the <kbd>Enter</kbd> and <kbd>Shift + Enter</kbd> keys in the editor.
  *
  * @memberOf enter
  * @extends ckeditor5.Feature
@@ -22,7 +22,7 @@ export default class Enter extends Feature {
 
 		editor.commands.set( 'enter', new EnterCommand( editor ) );
 
-		// TODO We may use keystroke handler for that.
+		// TODO We may use the keystroke handler for that.
 		this.listenTo( editingView, 'enter', ( evt, data ) => {
 			editor.execute( 'enter' );
 			data.preventDefault();

+ 6 - 6
packages/ckeditor5-enter/src/entercommand.js

@@ -9,7 +9,7 @@ import LivePosition from '../engine/model/liveposition.js';
 import Position from '../engine/model/position.js';
 
 /**
- * Enter command. Used by the {@link enter.Enter enter feature} to handle the <kbd>Enter</kbd> key.
+ * The Enter command. It is used by the {@link enter.Enter Enter feature} to handle the <kbd>Enter</kbd> key.
  *
  * @member enter
  * @extends ckeditor5.command.Command
@@ -25,14 +25,14 @@ export default class EnterCommand extends Command {
 }
 
 /**
- * Enters new block in the way how <kbd>Enter</kbd> is expected to work.
+ * Creates a new block in the way that the <kbd>Enter</kbd> key is expected to work.
  *
- * @param {engine.model.Batch} batch Batch to which the deltas will be added.
+ * @param {engine.model.Batch} batch A batch to which the deltas will be added.
  * @param {engine.model.Selection} selection
  * @param {Object} options
- * @param {Boolean} options.defaultBlockName Name of the block which should be created when enter leaves
- * another block. Usuall set to `'paragraph'`. E.g. when entering block in `<heading>foo^</heading>` the result will be
- * `<heading>foo</heading><paragraph>^</paragraph>`.
+ * @param {Boolean} options.defaultBlockName The name of the block which should be created when Enter leaves
+ * another block. Usually set to `'paragraph'`. For example, when creating a block in `<heading>foo^</heading>`,
+ * the result will be `<heading>foo</heading><paragraph>^</paragraph>`.
  */
 export function enterBlock( batch, selection, options = {} ) {
 	const defaultBlockName = options.defaultBlockName;

+ 3 - 3
packages/ckeditor5-enter/src/enterobserver.js

@@ -8,7 +8,7 @@ import DomEventData from '../engine/view/observer/domeventdata.js';
 import { keyCodes } from '../utils/keyboard.js';
 
 /**
- * Enter observer introduce the {@link engine.view.Document#enter} event.
+ * Enter observer introduces the {@link engine.view.Document#enter} event.
  *
  * @memberOf enter
  * @extends engine.view.observer.Observer
@@ -31,10 +31,10 @@ export default class EnterObserver extends Observer {
 }
 
 /**
- * Event fired when the user presses <kbd>Enter</kbd>.
+ * Event fired when the user presses the <kbd>Enter</kbd> key.
  *
  * Note: This event is fired by the {@link enter.EnterObserver observer}
- * (usually registered by the {@link enter.Enter enter feature}).
+ * (usually registered by the {@link enter.Enter Enter feature}).
  *
  * @event engine.view.Document#enter
  * @param {engine.view.observer.DomEventData} data