瀏覽代碼

Docs fixes.

Szymon Kupś 8 年之前
父節點
當前提交
3e81814806
共有 1 個文件被更改,包括 11 次插入10 次删除
  1. 11 10
      packages/ckeditor5-engine/src/conversion/model-to-view-converters.js

+ 11 - 10
packages/ckeditor5-engine/src/conversion/model-to-view-converters.js

@@ -444,14 +444,15 @@ export function highlightText( highlightDescriptor ) {
 }
 
 /**
- * Function factory, creates converter that converts all elements inside marker's range. Converter checks if element has
- * functions stored under `addHighlight` and `removeHighlight` custom properties and calls them when highlight should be added
- * or removed. In such case converter will consume all element's children, assuming that they were handled by element itself.
- * If highlight descriptor will not provide priority, priority `10` will be used as default, to be compliant with
+ * Converter function factory. Creates a function which applies the marker's highlight to all elements inside a marker's range.
+ * The converter checks if an element has the addHighlight and removeHighlight functions stored as
+ * {@link TODO custom properties} and if so use them to apply the highlight. In such case converter will consume all
+ * element's children, assuming that they were handled by element itself.
+ * If the highlight descriptor will not provide priority, priority `10` will be used as default, to be compliant with
  * {@link module:engine/conversion/model-to-view-converters~highlightText} method which uses default priority of
  * {@link module:engine/view/attributeelement~AttributeElement}.
  *
- * If highlight descriptor will not provide `id` property, name of the marker will be used.
+ * If the highlight descriptor will not provide `id` property, name of the marker will be used.
  * When `addHighlight` and `removeHighlight` custom properties are not present, element is not converted
  * in any special way. This means that converters will proceed to convert element's child nodes.
  *
@@ -633,16 +634,16 @@ class HighlightAttributeElement extends ViewAttributeElement {
 }
 
 /**
- * Object describing how content highlight should be created in the view.
+ * Object describing how the content highlight should be created in the view.
  *
- * Each text node contained in highlight will be wrapped with `span` element with CSS class(es), attributes and priority
+ * Each text node contained in the highlight will be wrapped with `span` element with CSS class(es), attributes and priority
  * described by this object.
  *
- * Each element can handle displaying highlight separately by providing `addHighlight` and `removeHighlight` custom
+ * Each element can handle displaying the highlight separately by providing `addHighlight` and `removeHighlight` custom
  * properties:
- *  * `HighlightDescriptor` is passed to `addHighlight` function upon conversion and should be used to apply highlight to
+ *  * `HighlightDescriptor` is passed to the `addHighlight` function upon conversion and should be used to apply the highlight to
  *  the element,
- *  * descriptor id is passed to `removeHighlight` function upon conversion and should be used to remove highlight of given
+ *  * descriptor id is passed to the `removeHighlight` function upon conversion and should be used to remove the highlight of given
  *  id from the element.
  *
  * @typedef {Object} module:engine/conversion/model-to-view-converters~HighlightDescriptor