8
0
Maciej Bukowski 8 лет назад
Родитель
Сommit
c7f2191609

+ 13 - 12
packages/ckeditor5-engine/src/model/markercollection.js

@@ -29,16 +29,18 @@ import mix from '@ckeditor/ckeditor5-utils/src/mix';
  * There're two types of markers. Both type of them should be added / updated by {@link module:engine/model/writer~Writer#setMarker}
  * There're two types of markers. Both type of them should be added / updated by {@link module:engine/model/writer~Writer#setMarker}
  * and removed by {@link module:engine/model/writer~Writer#removeMarker} methods. Both of them are stored in the {@link ~MarkerCollection}.
  * and removed by {@link module:engine/model/writer~Writer#removeMarker} methods. Both of them are stored in the {@link ~MarkerCollection}.
  *
  *
- * 1. Markers added to the document. They're synchronized in the collaboration and handled in the undo.
- * This type of markers is useful for solutions like spell checking or comments. Sample usage:
- * 		writer.setMarker( markerOrName, ranges, { usingOperation: true } );
- *
- * 2. Markers not added to document (default ones). They can be used as bookmarks or visual markers.
+ * 1. Markers not added to document (default ones). They can be used as bookmarks or visual markers.
  * They're great for showing results of the find, or select link when the focus is in the input,
  * They're great for showing results of the find, or select link when the focus is in the input,
  * see https://github.com/ckeditor/ckeditor5-link/issues/13. Sample usage:
  * see https://github.com/ckeditor/ckeditor5-link/issues/13. Sample usage:
  * 		writer.setMarker( markerOrName, ranges );
  * 		writer.setMarker( markerOrName, ranges );
  *
  *
+ * 1. Markers added to the document. They're synchronized in the collaboration and handled in the undo.
+ * This type of markers is useful for solutions like spell checking or comments. Sample usage:
+ * 		writer.setMarker( markerOrName, ranges, { usingOperation: true } );
+ *
  * Note: For efficiency reasons, it's best to create and keep at least markers as possible.
  * Note: For efficiency reasons, it's best to create and keep at least markers as possible.
+ *
+ * @see {module:engine/model/liverange~LiveRange}
  */
  */
 export default class MarkerCollection {
 export default class MarkerCollection {
 	/**
 	/**
@@ -247,16 +249,15 @@ mix( MarkerCollection, EmitterMixin );
  * There're two types of markers. Both type of them should be added /updated by {@link module:engine/model/writer~Writer#setMarker}
  * There're two types of markers. Both type of them should be added /updated by {@link module:engine/model/writer~Writer#setMarker}
  * and removed by {@link module:engine/model/writer~Writer#removeMarker} methods. Both of them are stored in the {@link ~MarkerCollection}.
  * and removed by {@link module:engine/model/writer~Writer#removeMarker} methods. Both of them are stored in the {@link ~MarkerCollection}.
  *
  *
+ * 1. Markers not added to document (default ones). They can be used as bookmarks or visual markers.
+ * They're great for showing results of the find, or select link when the focus is in the input,
+ * see https://github.com/ckeditor/ckeditor5-link/issues/13. Sample usage:
+ * 		writer.setMarker( markerOrName, ranges );
+ *
  * 1. Markers added to the document. They're synchronized in the collaboration and handled in the undo.
  * 1. Markers added to the document. They're synchronized in the collaboration and handled in the undo.
- * This type of markers is useful for solutions like spell checking or comments.
- * Usage:
+ * This type of markers is useful for solutions like spell checking or comments. Sample usage:
  * 		writer.setMarker( markerOrName, ranges, { usingOperation: true } );
  * 		writer.setMarker( markerOrName, ranges, { usingOperation: true } );
  *
  *
- * 2. Markers not added to document. They can be used as bookmarks or visual markers. They're great for showing results of the find,
- * or select link when the focus is in the input see https://github.com/ckeditor/ckeditor5-link/issues/13.
- * Usage:
- * 		writer.setMarker( markerOrName, ranges );
- *
  * Since markers are based on {@link module:engine/model/liverange~LiveRange live ranges}, for efficiency reasons, it's
  * Since markers are based on {@link module:engine/model/liverange~LiveRange live ranges}, for efficiency reasons, it's
  * best to create and keep at least markers as possible.
  * best to create and keep at least markers as possible.
  *
  *

+ 6 - 5
packages/ckeditor5-engine/src/model/writer.js

@@ -766,15 +766,15 @@ export default class Writer {
 	 *
 	 *
 	 * There're two types of markers.
 	 * There're two types of markers.
 	 *
 	 *
-	 * 1. Markers added to the document. They're synchronized in the collaboration and handled in the undo.
-	 * This type of markers is useful for solutions like spell checking or comments. Sample usage:
-	 * 		writer.setMarker( markerOrName, ranges, { usingOperation: true } );
-	 *
-	 * 2. Markers not added to document (default ones). They can be used as bookmarks or visual markers.
+	 * 1. Markers not added to document (default ones). They can be used as bookmarks or visual markers.
 	 * They're great for showing results of the find, or select link when the focus is in the input,
 	 * They're great for showing results of the find, or select link when the focus is in the input,
 	 * see https://github.com/ckeditor/ckeditor5-link/issues/13. Sample usage:
 	 * see https://github.com/ckeditor/ckeditor5-link/issues/13. Sample usage:
 	 * 		writer.setMarker( markerOrName, ranges );
 	 * 		writer.setMarker( markerOrName, ranges );
 	 *
 	 *
+	 * 1. Markers added to the document. They're synchronized in the collaboration and handled in the undo.
+	 * This type of markers is useful for solutions like spell checking or comments. Sample usage:
+	 * 		writer.setMarker( markerOrName, ranges, { usingOperation: true } );
+	 *
 	 * If passed name is a name of already existing marker (or {@link module:engine/model/markercollection~Marker Marker} instance
 	 * If passed name is a name of already existing marker (or {@link module:engine/model/markercollection~Marker Marker} instance
 	 * is passed), `range` parameter may be omitted (only for setting markers using operation). In this case marker will not be updated in
 	 * is passed), `range` parameter may be omitted (only for setting markers using operation). In this case marker will not be updated in
 	 * {@link module:engine/model/model~Model#markers document marker collection}. However the marker will be added to
 	 * {@link module:engine/model/model~Model#markers document marker collection}. However the marker will be added to
@@ -807,6 +807,7 @@ export default class Writer {
 	 *
 	 *
 	 * Note: For efficiency reasons, it's best to create and keep at least markers as possible.
 	 * Note: For efficiency reasons, it's best to create and keep at least markers as possible.
 	 *
 	 *
+	 * @see {module:engine/model/liverange~LiveRange}
 	 * @param {module:engine/model/markercollection~Marker|String|module:engine/model/range~Range} markerOrNameOrRange
 	 * @param {module:engine/model/markercollection~Marker|String|module:engine/model/range~Range} markerOrNameOrRange
 	 * Name of marker to add, Marker instance to update or range for the marker with a unique name.
 	 * Name of marker to add, Marker instance to update or range for the marker with a unique name.
 	 * @param {module:engine/model/range~Range|Object} [rangeOrOptions] Marker range or options.
 	 * @param {module:engine/model/range~Range|Object} [rangeOrOptions] Marker range or options.