Browse Source

Docs (ckeditor5): Fixed some API docs typos.

Marek Lewandowski 5 years ago
parent
commit
1a050aab31

+ 5 - 5
packages/ckeditor5-engine/src/model/schema.js

@@ -964,7 +964,7 @@ mix( Schema, ObservableMixin );
  *
  *		schema.on( 'checkAttribute', ( evt, args ) => {
  *			const context = args[ 0 ];
- *			const atributeName = args[ 1 ];
+ *			const attributeName = args[ 1 ];
  *
  *			if ( context.endsWith( 'heading1 $text' ) && attributeName == 'bold' ) {
  *				// Prevent next listeners from being called.
@@ -980,7 +980,7 @@ mix( Schema, ObservableMixin );
  *
  *		schema.on( 'checkAttribute', ( evt, args ) => {
  *			const context = args[ 0 ];
- *			const atributeName = args[ 1 ];
+ *			const attributeName = args[ 1 ];
  *
  *			if ( context.endsWith( 'bar foo $text' ) && attributeName == 'bold' ) {
  *				// Prevent next listeners from being called.
@@ -1107,7 +1107,7 @@ mix( Schema, ObservableMixin );
  * * If you want to publish your feature so other developers can use it, try to use
  * generic items as much as possible.
  * * Keep your model clean. Limit it to the actual data and store information in a normalized way.
- * * Remember about definining the `is*` properties. They do not affect the allowed structures, but they can
+ * * Remember about defining the `is*` properties. They do not affect the allowed structures, but they can
  * affect how the editor features treat your elements.
  *
  * @typedef {Object} module:engine/model/schema~SchemaItemDefinition
@@ -1119,7 +1119,7 @@ mix( Schema, ObservableMixin );
  * Rules fed to the schema by {@link module:engine/model/schema~Schema#register}
  * and {@link module:engine/model/schema~Schema#extend} methods are defined in the
  * {@link module:engine/model/schema~SchemaItemDefinition} format.
- * Later on, they are compiled to `SchemaCompiledItemDefition` so when you use e.g.
+ * Later on, they are compiled to `SchemaCompiledItemDefinition` so when you use e.g.
  * the {@link module:engine/model/schema~Schema#getDefinition} method you get the compiled version.
  *
  * The compiled version contains only the following properties:
@@ -1357,7 +1357,7 @@ export class SchemaContext {
  *		schema.checkAttribute( textNode, 'bold' );
  *
  * But sometimes you want to check whether a text at a given position might've had some attribute,
- * in which case you can create a context by mising an array of elements with a `'$text'` string:
+ * in which case you can create a context by missing an array of elements with a `'$text'` string:
  *
  *		// Check in [ rootElement, paragraphElement, textNode ].
  *		schema.checkChild( [ ...positionInParagraph.getAncestors(), '$text' ], 'bold' );

+ 2 - 2
packages/ckeditor5-engine/src/model/selection.js

@@ -108,7 +108,7 @@ export default class Selection {
 
 	/**
 	 * Selection anchor. Anchor is the position from which the selection was started. If a user is making a selection
-	 * by dragging the mouse, the anchor is where the user pressed the mouse button (the beggining of the selection).
+	 * by dragging the mouse, the anchor is where the user pressed the mouse button (the beginning of the selection).
 	 *
 	 * Anchor and {@link #focus} define the direction of the selection, which is important
 	 * when expanding/shrinking selection. The focus moves, while the anchor should remain in the same place.
@@ -863,7 +863,7 @@ function getParentBlock( position, visited ) {
 
 // Checks if the blocks is not nested in other block inside a range.
 //
-// @param {module:engine/model/elmenent~Element} block Block to check.
+// @param {module:engine/model/element~Element} block Block to check.
 // @param {module:engine/model/range~Range} range Range to check.
 function isTopBlockInRange( block, range ) {
 	const parentBlock = findAncestorBlock( block );

+ 1 - 1
packages/ckeditor5-engine/src/view/renderer.js

@@ -578,7 +578,7 @@ export default class Renderer {
 		}
 
 		// Unbind removed nodes. When node does not have a parent it means that it was removed from DOM tree during
-		// comparision with the expected DOM. We don't need to check child nodes, because if child node was reinserted,
+		// comparison with the expected DOM. We don't need to check child nodes, because if child node was reinserted,
 		// it was moved to DOM tree out of the removed node.
 		for ( const node of nodesToUnbind ) {
 			if ( !node.parentNode ) {