瀏覽代碼

Update normalizer documentation.

Maciej Gołaszewski 6 年之前
父節點
當前提交
0f447612b3
共有 1 個文件被更改,包括 7 次插入12 次删除
  1. 7 12
      packages/ckeditor5-paste-from-office/src/normalizer.jsdoc

+ 7 - 12
packages/ckeditor5-paste-from-office/src/normalizer.jsdoc

@@ -8,22 +8,17 @@
  */
 
 /**
- * Normalizer interface is a description of a mechanism which transforms input data send through
- * an {@link module:clipboard/clipboard~Clipboard#event:inputTransformation inputTransformation event}. Input data is transformed
- * for paste event came from office-like applications, for example, MS Word, Google Docs, etc. These applications generate content,
- * which frequently has an invalid HTML syntax. Normalizers detect environment-specific quirks and transform it into proper HTML syntax,
- * what later might be correctly upcast to the {@link module:engine/model/model~Model}.
+ * Interface defining a content transformation pasted from an external editor.
  *
- * Normalizers are registered by {@link module:paste-from-office/pastefromoffice~PasteFromOffice} plugin. Each instance has the
- * {@link #isActive} method, which checks if given normalizer should be applied for current data content. It is chosen first active
- * normalizer for the transformation process. If there is none, then data remain untouched.
+ * Normalizers are registered by the {@link module:paste-from-office/pastefromoffice~PasteFromOffice} plugin and run on
+ * {@link module:clipboard/clipboard~Clipboard#event:inputTransformation inputTransformation event}. They detect environment-specific
+ * quirks and transform it into a form compatible with other CKEditor features.
  *
  * @interface Normalizer
  */
 
 /**
- * Method determines if current normalizer should be run for given content. It takes an HTML string from `data.dataTransfer` as an argument
- * and it should return a boolean value.
+ * Must return `true` if the `htmlString` contains content which this normalizer can transform.
  *
  * @method #isActive
  * @param {String} htmlString full content of `dataTransfer.getData( 'text/html' )`
@@ -31,9 +26,9 @@
  */
 
 /**
- * Method applies normalization to given data.
+ * Executes the normalization of a given data.
  *
  * @method #exec
  * @param {Object} data object obtained from
- * {@link module:clipboard/clipboard~Clipboard#event:inputTransformation inputTransformation event}
+ * {@link module:clipboard/clipboard~Clipboard#event:inputTransformation inputTransformation event}.
  */