ソースを参照

Docs: Enter and ShiftEnter docs reviewed. [skip ci]

Anna Tomanek 7 年 前
コミット
dae2faecde

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

@@ -1,4 +1,4 @@
-CKEditor 5 enter feature
+CKEditor 5 Enter feature
 ========================================
 
 [![Join the chat at https://gitter.im/ckeditor/ckeditor5](https://badges.gitter.im/ckeditor/ckeditor5.svg)](https://gitter.im/ckeditor/ckeditor5?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

+ 3 - 3
packages/ckeditor5-enter/docs/api/enter.md

@@ -6,13 +6,13 @@ category: api-reference
 
 [![npm version](https://badge.fury.io/js/%40ckeditor%2Fckeditor5-enter.svg)](https://www.npmjs.com/package/@ckeditor/ckeditor5-enter)
 
-This package implements the <kbd>Enter</kbd> key support for CKEditor 5.
+This package implements the <kbd>Enter</kbd> and <kbd>Shift</kbd>+<kbd>Enter</kbd> key support for CKEditor 5.
 
 ## Documentation
 
-See the {@link module:enter/enter~Enter} plugin documentation.
+See the {@link module:enter/enter~Enter} and {@link module:enter/shiftenter~ShiftEnter} plugin documentation.
 
-This plugin is usually enabled by the {@link module:essentials/essentials~Essentials} plugin from the {@link api/essentials `@ckeditor/ckeditor5-essentials`} package (which also enables other fundamental editing features).
+The plugins are usually enabled by the {@link module:essentials/essentials~Essentials} plugin from the {@link api/essentials `@ckeditor/ckeditor5-essentials`} package (which also enables other fundamental editing features).
 
 ## Installation
 

+ 4 - 4
packages/ckeditor5-enter/src/shiftentercommand.js

@@ -32,7 +32,7 @@ export default class ShiftEnterCommand extends Command {
 	}
 }
 
-// Checks whether the shiftEnter command should be enabled in the specified selection.
+// Checks whether the ShiftEnter command should be enabled in the specified selection.
 //
 // @param {module:engine/model/schema~Schema} schema
 // @param {module:engine/model/selection~Selection|module:engine/model/documentselection~DocumentSelection} selection
@@ -62,7 +62,7 @@ function isEnabled( schema, selection ) {
 	return true;
 }
 
-// Creates a break in the way that the <kbd>Shift+Enter</kbd> key is expected to work.
+// Creates a break in the way that the <kbd>Shift</kbd>+<kbd>Enter</kbd> keystroke is expected to work.
 //
 // @param {module:engine/model~Model} model
 // @param {module:engine/model/writer~Writer} writer
@@ -94,7 +94,7 @@ function softBreakAction( model, writer, selection ) {
 		// We chose not to insert a line break in this case because:
 		//
 		// * it's not a very common scenario,
-		// * it actually surprised me when I saw "expected behaviour" in real life.
+		// * it actually surprised me when I saw the "expected behavior" in real life.
 		//
 		// It's ok if the user will need to be more specific where they want the <br> to be inserted.
 		else {
@@ -113,7 +113,7 @@ function insertBreak( writer, position ) {
 	writer.setSelection( breakLineElement, 'after' );
 }
 
-// Checks whether specified `element` is a children of limit element.
+// Checks whether the specified `element` is a child of the limit element.
 //
 // Checking whether the `<p>` element is inside a limit element:
 //   - <$root><p>Text.</p></$root> => false