Ver código fonte

Apply suggestions from code review.

Piotrek Koszuliński 6 anos atrás
pai
commit
9e85e24586

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

@@ -204,7 +204,7 @@ export default class DowncastHelpers extends ConversionHelpers {
 	 *			view: modelAttributeValue => ( { key: 'class', value: 'styled-' + modelAttributeValue } )
 	 *		} );
 	 *
-	 * *Note:* Downcasting to a style properties requires providing a style object as a `value`:
+	 * *Note:* Downcasting to a style property requires providing `value` as an object:
 	 *
 	 *		editor.conversion.for( 'downcast' ).attributeToAttribute( {
 	 *			model: 'lineHeight',

+ 3 - 3
packages/ckeditor5-engine/src/conversion/upcasthelpers.js

@@ -237,8 +237,8 @@ export default class UpcastHelpers extends ConversionHelpers {
 	 *			}
 	 *		} );
 	 *
-	 * Converting styles is a bit different as it requires an object to be set as a `value` and by default
-	 * a model attribute's value will be set to `true`. You can set any value by providing a `value` callback
+	 * Converting styles works a bit differently as it requires `view.styles` to be an object and by default
+	 * a model attribute will be set to `true` by such a converter. You can set the model attribute to any value by providing the `value` callback
 	 * that returns a desired value.
 	 *
 	 *		// Default conversion of font-weight style will result in setting bold attribute to true.
@@ -251,7 +251,7 @@ export default class UpcastHelpers extends ConversionHelpers {
 	 *			model: 'bold'
 	 *		} );
 	 *
-	 *		// This converter will pass any value of a style property define a callback.
+	 *		// This converter will pass any style value to the `lineHeight` model attribute.
 	 *		editor.conversion.for( 'upcast' ).attributeToAttribute( {
 	 *			view: {
 	 *				styles: {