Explorar o código

Reverted changes that should not be committed.

Kamil Piechaczek %!s(int64=7) %!d(string=hai) anos
pai
achega
a00f3debf0

+ 2 - 2
packages/ckeditor5-engine/src/conversion/downcast-converters.js

@@ -638,7 +638,7 @@ export function removeUIElement() {
  * The converter automatically consumes corresponding value from consumables list and stops the event (see
  * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).
  *
- *		modelDispatcher.on( 'attributes:customAttr:myElem', changeAttribute( ( value, data ) => {
+ *		modelDispatcher.on( 'attribute:customAttr:myElem', changeAttribute( ( value, data ) => {
  *			// Change attribute key from `customAttr` to `class` in view.
  *			const key = 'class';
  *			let value = data.attributeNewValue;
@@ -738,7 +738,7 @@ export function changeAttribute( attributeCreator ) {
  * The converter automatically consumes corresponding value from consumables list, stops the event (see
  * {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}).
  *
- *		modelDispatcher.on( 'attributes:bold', wrapItem( ( modelAttributeValue, viewWriter ) => {
+ *		modelDispatcher.on( 'attribute:bold', wrapItem( ( modelAttributeValue, viewWriter ) => {
  *			return viewWriter.createAttributeElement( 'strong' );
  *		} );
  *

+ 2 - 2
packages/ckeditor5-engine/src/conversion/modelconsumable.js

@@ -21,7 +21,7 @@ import TextProxy from '../model/textproxy';
  * during conversion, when given part of model item is converted (i.e. the view element has been inserted into the view,
  * but without attributes), consumable value is removed from `ModelConsumable`.
  *
- * For model items, `ModelConsumable` stores consumable values of one of following types: `insert`, `addattributes:<attributeKey>`,
+ * For model items, `ModelConsumable` stores consumable values of one of following types: `insert`, `addattribute:<attributeKey>`,
  * `changeattributes:<attributeKey>`, `removeattributes:<attributeKey>`.
  *
  * In most cases, it is enough to let {@link module:engine/conversion/downcastdispatcher~DowncastDispatcher}
@@ -312,7 +312,7 @@ export default class ModelConsumable {
 
 // Returns a normalized consumable type name from given string. A normalized consumable type name is a string that has
 // at most one colon, for example: `insert` or `addMarker:highlight`. If string to normalize has more "parts" (more colons),
-// the other parts are dropped, for example: `addattributes:bold:$text` -> `addattributes:bold`.
+// the other parts are dropped, for example: `addattribute:bold:$text` -> `addattributes:bold`.
 //
 // @param {String} type Consumable type.
 // @returns {String} Normalized consumable type.

+ 1 - 1
packages/ckeditor5-engine/src/conversion/viewconsumable.js

@@ -503,7 +503,7 @@ class ViewElementConsumables {
 				 *
 				 * @error viewconsumable-invalid-attribute
 				 */
-				throw new CKEditorError( 'viewconsumable-invalid-attributes: Classes and styles should be handled separately.' );
+				throw new CKEditorError( 'viewconsumable-invalid-attribute: Classes and styles should be handled separately.' );
 			}
 
 			consumables.set( name, true );

+ 1 - 1
packages/ckeditor5-engine/tests/conversion/downcast-converters.js

@@ -742,7 +742,7 @@ describe( 'downcast-converters', () => {
 			const modelElement = new ModelElement( 'paragraph', { classes: 'foo' }, new ModelText( 'foobar' ) );
 
 			dispatcher.on( 'attribute:class', ( evt, data, conversionApi ) => {
-				conversionApi.consumable.consume( data.item, 'attributes:class' );
+				conversionApi.consumable.consume( data.item, 'attribute:class' );
 			}, { priority: 'high' } );
 
 			model.change( writer => {