Răsfoiți Sursa

Docs fixes found by validator.

Szymon Kupś 8 ani în urmă
părinte
comite
40999c0a14

+ 10 - 9
packages/ckeditor5-engine/src/conversion/buildmodelconverter.js

@@ -58,15 +58,16 @@ import CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';
  *		buildModelConverter().for( dispatcher ).fromAttribute( 'bold' ).toElement( 'strong' );
  *
  * 4. Model marker to virtual selection converter. This is a converter that converts model markers to virtual
- * selection described by {@link engine/conversion/buildmodelconverter~VirtualSelectionDescriptor} object passed to
- * {@link #toVirtualSelection} method.
+ * selection described by {@link module:engine/conversion/buildmodelconverter~VirtualSelectionDescriptor} object passed to
+ * {@link module:engine/conversion/buildmodelconverter~ModelConverterBuilder#toVirtualSelection} method.
  *
  *		buildModelConverter().for( dispatcher ).fromMarker( 'search' ).toVirtualSelection( descriptor );
  *
  * 5. Model marker to element converter. This is a converter that takes model marker and creates separate elements at
- * the beginning and at the end of the marker's range. For more information see {@link #toElement} method.
+ * the beginning and at the end of the marker's range. For more information see
+ * {@link module:engine/conversion/buildmodelconverter~ModelConverterBuilder#toElement} method.
  *
- *		buildModelConverter().for( dispatcher ).fromMarker( 'search' ).toStamp( 'span' );
+ *		buildModelConverter().for( dispatcher ).fromMarker( 'search' ).toElement( 'span' );
  *
  * It is possible to provide various different parameters for
  * {@link module:engine/conversion/buildmodelconverter~ModelConverterBuilder#toElement},
@@ -202,7 +203,7 @@ class ModelConverterBuilder {
 	 * will be used. Keep in mind that when you view element instance or creator function, it has to be/return a
 	 * proper type of view element: {@link module:engine/view/containerelement~ContainerElement ViewContainerElement} if you convert
 	 * from element, {@link module:engine/view/attributeelement~AttributeElement ViewAttributeElement} if you convert
-	 * from attribute and {@link module:engine/view/uielement~UIelement ViewUIElement} if you convert from marker.
+	 * from attribute and {@link module:engine/view/uielement~UIElement ViewUIElement} if you convert from marker.
 	 *
 	 * NOTE: When converting from model's marker, separate elements will be created at the beginning and at the end of the
 	 * marker's range. If range is collapsed then only one element will be created. See how markers
@@ -274,10 +275,10 @@ class ModelConverterBuilder {
 	 * a representation of the model marker in the view:
 	 * * each {@link module:engine/view/text~Text view text node} in the marker's range will be wrapped with `span`
 	 * {@link module:engine/view/attributeelement~AttributeElement},
-	 * * each {@link module:engine/view/element~Element view element} in the marker's range can handle the virtual
-	 * selection individually by providing `setVirtualSelection` and `removeVirtualSelection` methods.
+	 * * each {@link module:engine/view/containerelement~ContainerElement container view element} in the marker's
+	 * range can handle the virtual selection individually by providing `setVirtualSelection` and `removeVirtualSelection` methods.
 	 *
-	 * {@link module:engine/convresion/buildmodelconverter~VirtualSelectionDescriptor Descriptor} will be used to create
+	 * {@link module:engine/conversion/buildmodelconverter~VirtualSelectionDescriptor Descriptor} will be used to create
 	 * spans over text nodes and also will be provided to `setVirtualSelection` and `removeVirtualSelection` methods
 	 * each time virtual selection should be set or removed from view elements.
 	 * NOTE: When `setVirtualSelection` and `removeVirtualSelection` methods are present, converter assumes that element
@@ -298,7 +299,7 @@ class ModelConverterBuilder {
 	 * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError}
 	 * `build-model-converter-non-marker-to-virtual-selection` when trying to convert not from marker.
 	 *
-	 * @param {function|module:engine/convresion/buildmodelconverter~VirtualSelectionDescriptor} selectionDescriptor
+	 * @param {function|module:engine/conversion/buildmodelconverter~VirtualSelectionDescriptor} selectionDescriptor
 	 */
 	toVirtualSelection( selectionDescriptor ) {
 		const priority = this._from.priority === null ? 'normal' : this._from.priority;

+ 0 - 5
packages/ckeditor5-engine/src/conversion/model-selection-to-view-converters.js

@@ -113,11 +113,6 @@ export function convertCollapsedSelection() {
  *			}
  *		}
  *		modelDispatcher.on( 'selectionAttribute:style', convertSelectionAttribute( styleCreator ) );
- *
- * **Note:** You can use the same `elementCreator` function for this converter factory
- * and {@link module:engine/conversion/model-to-view-converters~wrapRange}
- * model to view converter, as long as the `elementCreator` function uses only the first parameter (attribute value).
- *
  *		modelDispatcher.on( 'selection', convertCollapsedSelection() );
  *		modelDispatcher.on( 'selectionAttribute:italic', convertSelectionAttribute( new ViewAttributeElement( 'em' ) ) );
  *		modelDispatcher.on( 'selectionAttribute:bold', convertSelectionAttribute( new ViewAttributeElement( 'strong' ) ) );

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

@@ -389,7 +389,7 @@ export function remove() {
  * Function factory, crates marker to virtual selection converter.
  * For more information see {@link module:engine/conversion/buildmodelconverter~ModelConverterBuilder#toVirtualSelection}.
  *
- * @param {module:engine/conversion/modelconversiondispatcher~VirtualSelectionDescriptor|Function} selectionDescriptor
+ * @param {module:engine/conversion/buildmodelconverter~VirtualSelectionDescriptor|Function} selectionDescriptor
  * @return {Function} Marker to virtual selection converter.
  */
 export function markerToVirtualSelection( selectionDescriptor ) {
@@ -519,9 +519,9 @@ export function eventNameToConsumableType( evtName ) {
 
 /**
  * Creates `span` {@link module:engine/view/attributeelement~AttributeElement view attribute element} from information
- * provided by {@link module:engine/conversion/modelconversiondispatcher~VirtualSelectionDescriptor} object.
+ * provided by {@link module:engine/conversion/buildmodelconverter~VirtualSelectionDescriptor} object.
  *
- * @param {module:engine/conversion/modelconversiondispatcher~VirtualSelectionDescriptor }descriptor
+ * @param {module:engine/conversion/buildmodelconverter~VirtualSelectionDescriptor }descriptor
  * @return {module:engine/view/attributeelement~AttributeElement}
  */
 export function virtualSelectionDescriptorToAttribute( descriptor ) {