Kaynağa Gözat

Docs: List feature readme and API docs corrected.

Anna Tomanek 6 yıl önce
ebeveyn
işleme
0ad869d033

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

@@ -9,7 +9,7 @@ CKEditor 5 list feature
 [![Dependency Status](https://david-dm.org/ckeditor/ckeditor5-list/status.svg)](https://david-dm.org/ckeditor/ckeditor5-list)
 [![devDependency Status](https://david-dm.org/ckeditor/ckeditor5-list/dev-status.svg)](https://david-dm.org/ckeditor/ckeditor5-list?type=dev)
 
-This package implements bulleted and numbered list feature for CKEditor 5.
+This package implements bulleted, numbered and to-do list feature for CKEditor 5.
 
 ## Documentation
 

+ 17 - 17
packages/ckeditor5-list/src/converters.js

@@ -11,7 +11,7 @@ import { createViewListItemElement } from './utils';
 import TreeWalker from '@ckeditor/ckeditor5-engine/src/model/treewalker';
 
 /**
- * A model-to-view converter for `listItem` model element insertion.
+ * A model-to-view converter for the `listItem` model element insertion.
  *
  * It creates a `<ul><li></li><ul>` (or `<ol>`) view structure out of a `listItem` model element, inserts it at the correct
  * position, and merges the list with surrounding lists (if available).
@@ -43,7 +43,7 @@ export function modelViewInsertion( model ) {
 }
 
 /**
- * A model-to-view converter for `listItem` model element removal.
+ * A model-to-view converter for the `listItem` model element removal.
  *
  * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:remove
  * @param {module:engine/model/model~Model} model Model instance.
@@ -86,9 +86,9 @@ export function modelViewRemove( model ) {
 }
 
 /**
- * A model-to-view converter for `type` attribute change on `listItem` model element.
+ * A model-to-view converter for the `type` attribute change on the `listItem` model element.
  *
- * This change means that `<li>` elements parent changes from `<ul>` to `<ol>` (or vice versa). This is accomplished
+ * This change means that the `<li>` element parent changes from `<ul>` to `<ol>` (or vice versa). This is accomplished
  * by breaking view elements, changing their name and merging them.
  *
  * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute
@@ -126,7 +126,7 @@ export function modelViewChangeType( evt, data, conversionApi ) {
 }
 
 /**
- * A model-to-view converter for `listIndent` attribute change on `listItem` model element.
+ * A model-to-view converter for the `listIndent` attribute change on the `listItem` model element.
  *
  * @see module:engine/conversion/downcastdispatcher~DowncastDispatcher#event:attribute
  * @param {module:engine/model/model~Model} model Model instance.
@@ -326,7 +326,7 @@ export function modelViewMergeAfter( evt, data, conversionApi ) {
 }
 
 /**
- * A view-to-model converter that converts `<li>` view elements into `listItem` model elements.
+ * A view-to-model converter that converts the `<li>` view elements into the `listItem` model elements.
  *
  * To set correct values of the `listType` and `listIndent` attributes the converter:
  * * checks `<li>`'s parent,
@@ -386,8 +386,8 @@ export function viewModelConverter( evt, data, conversionApi ) {
 }
 
 /**
- * A view-to-model converter for `<ul>` and `<ol>` view elements that cleans the input view of garbage.
- * This is mostly to clean whitespaces from between `<li>` view elements inside the view list element, however, also
+ * A view-to-model converter for the `<ul>` and `<ol>` view elements that cleans the input view of garbage.
+ * This is mostly to clean whitespaces from between the `<li>` view elements inside the view list element, however, also
  * incorrect data can be cleared if the view was incorrect.
  *
  * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element
@@ -409,7 +409,7 @@ export function cleanList( evt, data, conversionApi ) {
 }
 
 /**
- * A view-to-model converter for `<li>` elements that cleans whitespace formatting from the input view.
+ * A view-to-model converter for the `<li>` elements that cleans whitespace formatting from the input view.
  *
  * @see module:engine/conversion/upcastdispatcher~UpcastDispatcher#event:element
  * @param {module:utils/eventinfo~EventInfo} evt An object containing information about the fired event.
@@ -453,9 +453,9 @@ export function cleanListItem( evt, data, conversionApi ) {
 }
 
 /**
- * Returns callback for model position to view position mapping for {@link module:engine/conversion/mapper~Mapper}. The callback fixes
- * positions between `listItem` elements that would be incorrectly mapped because of how list items are represented in model
- * and view.
+ * Returns a callback for model position to view position mapping for {@link module:engine/conversion/mapper~Mapper}. The callback fixes
+ * positions between the `listItem` elements that would be incorrectly mapped because of how list items are represented in the model
+ * and in the view.
  *
  * @see module:engine/conversion/mapper~Mapper#event:modelToViewPosition
  * @param {module:engine/view/view~View} view A view instance.
@@ -491,8 +491,8 @@ export function modelToViewPosition( view ) {
 
 /**
  * The callback for view position to model position mapping for {@link module:engine/conversion/mapper~Mapper}. The callback fixes
- * positions between `<li>` elements that would be incorrectly mapped because of how list items are represented in model
- * and view.
+ * positions between the `<li>` elements that would be incorrectly mapped because of how list items are represented in the model
+ * and in the view.
  *
  * @see module:engine/conversion/mapper~Mapper#event:viewToModelPosition
  * @param {module:engine/model/model~Model} model Model instance.
@@ -555,14 +555,14 @@ export function viewToModelPosition( model ) {
 /**
  * Post-fixer that reacts to changes on document and fixes incorrect model states.
  *
- * In an example below, there is a correct list structure.
- * Then the middle element will be removed so the list structure will become incorrect:
+ * In the example below, there is a correct list structure.
+ * Then the middle element is removed so the list structure will become incorrect:
  *
  *		<listItem listType="bulleted" listIndent=0>Item 1</listItem>
  *		<listItem listType="bulleted" listIndent=1>Item 2</listItem>   <--- this is removed.
  *		<listItem listType="bulleted" listIndent=2>Item 3</listItem>
  *
- * List structure after the middle element removed:
+ * The list structure after the middle element is removed:
  *
  * 		<listItem listType="bulleted" listIndent=0>Item 1</listItem>
  *		<listItem listType="bulleted" listIndent=2>Item 3</listItem>

+ 1 - 1
packages/ckeditor5-list/src/indentcommand.js

@@ -44,7 +44,7 @@ export default class IndentCommand extends Command {
 	}
 
 	/**
-	 * Indents or outdents (depends on the {@link #constructor}'s `indentDirection` parameter) selected list items.
+	 * Indents or outdents (depending on the {@link #constructor}'s `indentDirection` parameter) selected list items.
 	 *
 	 * @fires execute
 	 */

+ 1 - 1
packages/ckeditor5-list/src/list.js

@@ -15,7 +15,7 @@ import Plugin from '@ckeditor/ckeditor5-core/src/plugin';
 /**
  * The list feature.
  *
- * This is a "glue" plugin which loads the {@link module:list/listediting~ListEditing list editing feature}
+ * This is a "glue" plugin that loads the {@link module:list/listediting~ListEditing list editing feature}
  * and {@link module:list/listui~ListUI list UI feature}.
  *
  * @extends module:core/plugin~Plugin

+ 1 - 1
packages/ckeditor5-list/src/utils.js

@@ -10,7 +10,7 @@
 import { getFillerOffset } from '@ckeditor/ckeditor5-engine/src/view/containerelement';
 
 /**
- * Creates list item {@link module:engine/view/containerelement~ContainerElement}.
+ * Creates a list item {@link module:engine/view/containerelement~ContainerElement}.
  *
  * @param {module:engine/view/downcastwriter~DowncastWriter} writer The writer instance.
  * @returns {module:engine/view/containerelement~ContainerElement}