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

Added docs to responsive attribute converter. Updated ImageEngine class docs.

Szymon Kupś преди 8 години
родител
ревизия
2a8f975b7d
променени са 2 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 5 0
      packages/ckeditor5-image/src/image/converters.js
  2. 1 1
      packages/ckeditor5-image/src/image/imageengine.js

+ 5 - 0
packages/ckeditor5-image/src/image/converters.js

@@ -80,6 +80,11 @@ export function createImageAttributeConverter( dispatchers, attributeName, conve
 	}
 }
 
+/**
+ * Converter used to convert `responsive` image's attribute to `srcset`, `sizes` and `width` attributes in the view.
+ *
+ * @return {Function}
+ */
 export function responsiveAttributeConverter() {
 	return ( evt, data, consumable, conversionApi ) => {
 		const parts = evt.name.split( ':' );

+ 1 - 1
packages/ckeditor5-image/src/image/imageengine.js

@@ -24,7 +24,7 @@ import ViewEmptyElement from '@ckeditor/ckeditor5-engine/src/view/emptyelement';
 
 /**
  * The image engine plugin.
- * Registers `<image>` as a block element in the document schema and allows it to have two attributes: `src` and `alt`.
+ * Registers `<image>` as a block element in the document schema, and allows `alt`, `src` and `responsive` attributes.
  * Registers converters for editing and data pipelines.
  *
  * @extends module:core/plugin~Plugin