Преглед изворни кода

Added more plugins to virutal selection manual test, small doc fixes.

Szymon Kupś пре 8 година
родитељ
комит
087158d4aa

+ 7 - 7
packages/ckeditor5-engine/src/conversion/modelconversiondispatcher.js

@@ -657,9 +657,9 @@ export default class ModelConversionDispatcher {
 
 	/**
 	 * Fired when a new marker is added to the model.
-	 * * If marker's range is not collapsed then event is fired separately for each item contained in that range. Consumable
-	 * contains all items from that range.
-	 * * If marker's range is collapsed then single event is fired. Consumable contains collapsed range.
+	 * * If marker's range is not collapsed, event is fired separately for each item contained in that range. In this
+	 * situation, consumable contains all items from that range.
+	 * * If marker's range is collapsed, single event is fired. In this situation, consumable contains only the collapsed range.
 	 *
 	 * `addMarker` is a namespace for a class of events. Names of actually called events follow this pattern:
 	 * `addMarker:<markerName>`. By specifying certain marker names, you can make the events even more gradual. For example,
@@ -673,7 +673,7 @@ export default class ModelConversionDispatcher {
 	 * @param {module:engine/model/range~Range} [data.range] Range spanning over item. Not present if collapsed range
 	 * is being converted.
 	 * @param {String} data.markerName Name of the marker.
-	 * @param {module:engine/model/range~Range} data.markerRange Whole marker's range.
+	 * @param {module:engine/model/range~Range} data.markerRange Marker's range spanning on all items.
 	 * @param {module:engine/conversion/modelconsumable~ModelConsumable} consumable Values to consume. When non-collapsed
 	 * marker is being converted then consumable contains all items in marker's range. For collapsed markers it contains
 	 * only marker's range to consume.
@@ -682,9 +682,9 @@ export default class ModelConversionDispatcher {
 
 	/**
 	 * Fired when marker is removed from the model.
-	 * * If marker's range is not collapsed then event is fired separately for each item contained in that range. Consumable
-	 * contains all items from that range.
-	 * * If marker's range is collapsed then single event is fired. Consumable contains collapsed range.
+	 * * If marker's range is not collapsed, event is fired separately for each item contained in that range. In this
+	 * situation, consumable contains all items from that range.
+	 * * If marker's range is collapsed, single event is fired. In this situation, consumable contains only the collapsed range.
 	 *
 	 * `removeMarker` is a namespace for a class of events. Names of actually called events follow this pattern:
 	 * `removeMarker:<markerName>`. By specifying certain marker names, you can make the events even more gradual. For example,

+ 5 - 2
packages/ckeditor5-engine/tests/manual/virtualselection.js

@@ -11,6 +11,9 @@ import Typing from '@ckeditor/ckeditor5-typing/src/typing';
 import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
 import Undo from '@ckeditor/ckeditor5-undo/src/undo';
 import Heading from '@ckeditor/ckeditor5-heading/src/heading';
+import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
+import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
+import List from '@ckeditor/ckeditor5-list/src/list';
 import global from '@ckeditor/ckeditor5-utils/src/dom/global';
 import buildModelConverter from '../../src/conversion/buildmodelconverter';
 import buildViewConverter from '../../src/conversion/buildviewconverter';
@@ -56,8 +59,8 @@ class FancyWidget extends Plugin {
 }
 
 ClassicEditor.create( global.document.querySelector( '#editor' ), {
-	plugins: [ Enter, Typing, Paragraph, Undo, Heading, FancyWidget ],
-	toolbar: [ 'headings', 'undo', 'redo' ]
+	plugins: [ Enter, Typing, Paragraph, Undo, Heading, Bold, Italic, List, FancyWidget ],
+	toolbar: [ 'headings', 'undo', 'redo', 'bold', 'italic', 'numberedList', 'bulletedList' ]
 } )
 	.then( editor => {
 		window.editor = editor;