Преглед на файлове

Docs: Restricted editing API docs corrected.

Anna Tomanek преди 6 години
родител
ревизия
01f2c7ae35

+ 8 - 7
packages/ckeditor5-restricted-editing/src/restrictededitingmode.js

@@ -14,12 +14,12 @@ import RestrictedEditingModeUI from './restrictededitingmodeui';
 import '../theme/restrictedediting.css';
 
 /**
- * The Restricted Editing Mode plugin.
+ * The restricted editing mode plugin.
  *
  * This is a "glue" plugin which loads the following plugins:
  *
- * * The {@link module:restricted-editing/restrictededitingmodeediting~RestrictedEditingModeEditing restricted mode editing feature} and
- * * The {@link module:restricted-editing/restrictededitingmodeui~RestrictedEditingModeUI restricted mode ui feature}.
+ * * The {@link module:restricted-editing/restrictededitingmodeediting~RestrictedEditingModeEditing restricted mode editing feature}.
+ * * The {@link module:restricted-editing/restrictededitingmodeui~RestrictedEditingModeUI restricted mode UI feature}.
  *
  * @extends module:core/plugin~Plugin
  */
@@ -68,12 +68,13 @@ export default class RestrictedEditingMode extends Plugin {
  */
 
 /**
- * The commands names allowed in non-restricted areas of the content.
+ * The command names allowed in non-restricted areas of the content.
  *
- * Define which feature commands should be enabled in restricted editing mode. The commands used for typing and deleting text
- * (`'input'`, `'delete'` and `'forwardDelete'`) are allowed by the feature inside non-restricted regions and does not have to be defined.
+ * Defines which feature commands should be enabled in the restricted editing mode. The commands used for typing and deleting text
+ * (`'input'`, `'delete'` and `'forwardDelete'`) are allowed by the feature inside non-restricted regions and do not need to be defined.
  *
- * **Note**: The restricted editing mode always allows to use restricted mode navigation commands as well as `'undo'` and `'redo'` commands.
+ * **Note**: The restricted editing mode always allows to use the restricted mode navigation commands as well as `'undo'` and `'redo'`
+ * commands.
  *
  * The default value is:
  *

+ 9 - 9
packages/ckeditor5-restricted-editing/src/restrictededitingmode/converters.js

@@ -13,14 +13,14 @@ import { getMarkerAtPosition } from './utils';
 const HIGHLIGHT_CLASS = 'ck-restricted-editing-exception_selected';
 
 /**
- * Adds a visual highlight style to a restricted editing exception the selection is anchored to.
+ * Adds a visual highlight style to a restricted editing exception that the selection is anchored to.
  *
- * Highlight is turned on by adding the `.ck-restricted-editing-exception_selected` class to the
+ * The highlight is turned on by adding the `.ck-restricted-editing-exception_selected` class to the
  * exception in the view:
  *
- * * The class is removed before the conversion has started, as callbacks added with the `'highest'` priority
+ * * The class is removed before the conversion starts, as callbacks added with the `'highest'` priority
  * to {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher} events.
- * * The class is added in the view post fixer, after other changes in the model tree were converted to the view.
+ * * The class is added in the view post-fixer, after other changes in the model tree are converted to the view.
  *
  * This way, adding and removing the highlight does not interfere with conversion.
  *
@@ -67,7 +67,7 @@ export function setupExceptionHighlighting( editor ) {
 }
 
 /**
- * A post-fixer that prevents removing collapsed marker from the document.
+ * A post-fixer that prevents removing a collapsed marker from the document.
  *
  * @param {module:core/editor/editor~Editor} editor
  * @returns {Function}
@@ -92,7 +92,7 @@ export function resurrectCollapsedMarkerPostFixer( editor ) {
 }
 
 /**
- * A post-fixer that extends a marker when user types on it boundaries.
+ * A post-fixer that extends a marker when the user types on its boundaries.
  *
  * @param {module:core/editor/editor~Editor} editor
  * @returns {Function}
@@ -114,12 +114,12 @@ export function extendMarkerOnTypingPostFixer( editor ) {
 }
 
 /**
- * A view highlight to marker conversion helper.
+ * A view highlight-to-marker conversion helper.
  *
  * @param {Object} config Conversion configuration.
- * @param {module:engine/view/matcher~MatcherPattern} [config.view] Pattern matching all view elements which should be converted. If not
+ * @param {module:engine/view/matcher~MatcherPattern} [config.view] A pattern matching all view elements which should be converted. If not
  * set, the converter will fire for every view element.
- * @param {String|module:engine/model/element~Element|Function} config.model Name of the model element, a model element
+ * @param {String|module:engine/model/element~Element|Function} config.model The name of the model element, a model element
  * instance or a function that takes a view element and returns a model element. The model element will be inserted in the model.
  * @param {module:utils/priorities~PriorityString} [config.converterPriority='normal'] Converter priority.
  */

+ 4 - 4
packages/ckeditor5-restricted-editing/src/restrictededitingmode/utils.js

@@ -9,8 +9,8 @@
 
 /**
  * Returns a single "restricted-editing-exception" marker at a given position. Contrary to
- * {@link module:engine/model/markercollection~MarkerCollection#getMarkersAtPosition} it return a marker also when the postion is equal
- * to one of markers start or end positions.
+ * {@link module:engine/model/markercollection~MarkerCollection#getMarkersAtPosition}, it returnd a marker also when the postion is
+ * equal to one of the marker's start or end positions.
  *
  * @param {module:core/editor/editor~Editor} editor
  * @param {module:engine/model/position~Position} position
@@ -29,7 +29,7 @@ export function getMarkerAtPosition( editor, position ) {
 }
 
 /**
- * Checks if the position is fully contained in range. Positions equal to range start or end are considered "in".
+ * Checks if the position is fully contained in the range. Positions equal to range start or end are considered "in".
  *
  * @param {module:engine/model/range~Range} range
  * @param {module:engine/model/position~Position} position
@@ -44,7 +44,7 @@ export function isPositionInRangeBoundaries( range, position ) {
 }
 
 /**
- * Checks if the selection is fully contained in marker. Positions on marker boundaries are considered "in".
+ * Checks if the selection is fully contained in the marker. Positions on marker boundaries are considered "in".
  *
  *		<marker>[]foo</marker> -> true
  *		<marker>f[oo]</marker> -> true

+ 11 - 11
packages/ckeditor5-restricted-editing/src/restrictededitingmodeediting.js

@@ -18,11 +18,11 @@ import {
 import { getMarkerAtPosition, isSelectionInMarker } from './restrictededitingmode/utils';
 
 /**
- * The Restricted Editing Mode editing feature.
+ * The restricted editing mode editing feature.
  *
- * * It introduces the exception marker group that renders to `<spans>` with the `ck-restricted-editing-exception` CSS class.
+ * * It introduces the exception marker group that renders to `<span>` elements with the `ck-restricted-editing-exception` CSS class.
  * * It registers the `'goToPreviousRestrictedEditingException'` and `'goToNextRestrictedEditingException'` commands.
- * * Also enables highlighting exception markers that are selected.
+ * * It also enables highlighting exception markers that are selected.
  *
  * @extends module:core/plugin~Plugin
  */
@@ -45,7 +45,7 @@ export default class RestrictedEditingModeEditing extends Plugin {
 		} );
 
 		/**
-		 * Command names that are enabled outside non-restricted regions.
+		 * Command names that are enabled outside the non-restricted regions.
 		 *
 		 * @type {Set.<String>}
 		 * @private
@@ -55,7 +55,7 @@ export default class RestrictedEditingModeEditing extends Plugin {
 		/**
 		 * Commands allowed in non-restricted areas.
 		 *
-		 * Commands always enabled combines typing feature commands: `'typing'`, `'delete'` and `'forwardDelete'` with commands defined
+		 * Commands always enabled combine typing feature commands: `'typing'`, `'delete'` and `'forwardDelete'` with commands defined
 		 * in the feature configuration.
 		 *
 		 * @type {Set<string>}
@@ -95,11 +95,11 @@ export default class RestrictedEditingModeEditing extends Plugin {
 	}
 
 	/**
-	 * Setups restricted mode editing conversion:
+	 * Sets up the restricted mode editing conversion:
 	 *
-	 * * ucpast & downcast converters
-	 * * marker highlighting in the edting area
-	 * * marker post-fixers
+	 * * ucpast & downcast converters,
+	 * * marker highlighting in the edting area,
+	 * * marker post-fixers.
 	 *
 	 * @private
 	 */
@@ -166,7 +166,7 @@ export default class RestrictedEditingModeEditing extends Plugin {
 	}
 
 	/**
-	 * Setups the commands toggling - enables or disables commands based on user selection.
+	 * Sets up the command toggling which enables or disables commands based on the user selection.
 	 *
 	 * @private
 	 */
@@ -182,7 +182,7 @@ export default class RestrictedEditingModeEditing extends Plugin {
 	}
 
 	/**
-	 * Checks if commands should be enabled or disabled based on current selection.
+	 * Checks if commands should be enabled or disabled based on the current selection.
 	 *
 	 * @private
 	 */

+ 3 - 3
packages/ckeditor5-restricted-editing/src/restrictededitingmodenavigationcommand.js

@@ -18,14 +18,14 @@ export default class RestrictedEditingModeNavigationCommand extends Command {
 	/**
 	 * Creates an instance of the command.
 	 *
-	 * @param {module:core/editor/editor~Editor} editor Editor instance.
-	 * @param {String} direction Direction the command works. Can be either `'forward'` or `'backward'`.
+	 * @param {module:core/editor/editor~Editor} editor The editor instance.
+	 * @param {String} direction The direction that the command works. Can be either `'forward'` or `'backward'`.
 	 */
 	constructor( editor, direction ) {
 		super( editor );
 
 		/**
-		 * A direction of the command. Can be `'forward'` or `'backward'`.
+		 * The direction of the command. Can be `'forward'` or `'backward'`.
 		 *
 		 * @readonly
 		 * @private

+ 5 - 5
packages/ckeditor5-restricted-editing/src/restrictededitingmodeui.js

@@ -14,9 +14,9 @@ import lockIcon from '../theme/icons/contentlock.svg';
 import Collection from '@ckeditor/ckeditor5-utils/src/collection';
 
 /**
- * The Restricted Editing Mode UI feature.
+ * The restricted editing mode UI feature.
  *
- * It introduces the `'restrictedEditing'` dropdown that offers tools to navigate exceptions across
+ * It introduces the `'restrictedEditing'` dropdown that offers tools to navigate between exceptions across
  * the document.
  *
  * @extends module:core/plugin~Plugin
@@ -74,9 +74,9 @@ export default class RestrictedEditingModeUI extends Plugin {
 	 * Returns a definition of the navigation button to be used in the dropdown.
 	 *
 	 * @private
-	 * @param {String} commandName Name of the command the button represents.
-	 * @param {String} label Translated label of the button.
-	 * @param {String} keystroke Keystroke of the button.
+	 * @param {String} commandName The name of the command that the button represents.
+	 * @param {String} label The translated label of the button.
+	 * @param {String} keystroke The button keystroke.
 	 * @returns {module:ui/dropdown/utils~ListDropdownItemDefinition}
 	 */
 	_getButtonDefinition( commandName, label, keystroke ) {

+ 4 - 4
packages/ckeditor5-restricted-editing/src/standardeditingmode.js

@@ -15,12 +15,12 @@ import StandardEditingModeUI from './standardeditingmodeui';
 import '../theme/restrictedediting.css';
 
 /**
- * The Standard Editing Mode plugin.
+ * The standard editing mode plugin.
  *
- * This is a "glue" plugin which loads the following plugins:
+ * This is a "glue" plugin that loads the following plugins:
  *
- * * The {@link module:restricted-editing/standardeditingmodeediting~StandardEditingModeEditing standard mode editing feature} and
- * * The {@link module:restricted-editing/standardeditingmodeui~StandardEditingModeUI standard mode ui feature}.
+ * * The {@link module:restricted-editing/standardeditingmodeediting~StandardEditingModeEditing standard mode editing feature}.
+ * * The {@link module:restricted-editing/standardeditingmodeui~StandardEditingModeUI standard mode UI feature}.
  *
  * @extends module:core/plugin~Plugin
  */

+ 3 - 3
packages/ckeditor5-restricted-editing/src/standardeditingmodeediting.js

@@ -11,10 +11,10 @@ import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 import RestrictedEditingExceptionCommand from './restrictededitingexceptioncommand';
 
 /**
- * The Standard Editing Mode editing feature.
+ * The standard editing mode editing feature.
  *
- * * It introduces the `restrictedEditingException` text attributes that is rendered as
- * `<spans>` with the `ck-restricted-editing-exception` CSS class.
+ * * It introduces the `restrictedEditingException` text attribute that is rendered as
+ * a `<span>` element with the `ck-restricted-editing-exception` CSS class.
  * * It registers the `'restrictedEditingException'` command.
  *
  * @extends module:core/plugin~Plugin

+ 1 - 1
packages/ckeditor5-restricted-editing/src/standardeditingmodeui.js

@@ -13,7 +13,7 @@ import ButtonView from '@ckeditor/ckeditor5-ui/src/button/buttonview';
 import unlockIcon from '../theme/icons/contentunlock.svg';
 
 /**
- * The Standard Editing Mode UI feature.
+ * The standard editing mode UI feature.
  *
  * It introduces the `'restrictedEditingException'` button that marks text as unrestricted for editing.
  *