8
0
Aleksander Nowodzinski 5 жил өмнө
parent
commit
4088528032

+ 2 - 2
packages/ckeditor5-widget/src/widgettypearound/widgettypearound.js

@@ -635,8 +635,8 @@ export default class WidgetTypeAround extends Plugin {
 	}
 
 	/**
-	 * Attaches the "insertContent" model event listener that allows the user to paste a content near the widget
-	 * when the "fake caret" was first activated using the arrow keys.
+	 * Attaches the {@link module:engine/model/model~Model#event:insertContent} event listener that, for instance, allows the user to paste
+	 * content near a widget when the "fake caret" was first activated using the arrow keys.
 	 *
 	 * The content is inserted according to the "widget-type-around" selection attribute (see {@link #_handleArrowKeyPress}).
 	 *

+ 8 - 8
packages/ckeditor5-widget/tests/widgettypearound/widgettypearound.js

@@ -734,7 +734,7 @@ describe( 'WidgetTypeAround', () => {
 			expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false;
 		} );
 
-		it( 'should quit the "fake caret" mode when model was changed (model.deleteContent)', () => {
+		it( 'should quit the "fake caret" mode when model was changed (model.deleteContent())', () => {
 			setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]<paragraph>baz</paragraph>' );
 
 			const selection = model.createSelection( modelSelection );
@@ -752,7 +752,7 @@ describe( 'WidgetTypeAround', () => {
 			expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false;
 		} );
 
-		it( 'should quit the "fake caret" mode when model was changed (writer.remove)', () => {
+		it( 'should quit the "fake caret" mode when model was changed (writer.remove())', () => {
 			setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]<paragraph>baz</paragraph>' );
 
 			model.change( writer => {
@@ -1347,7 +1347,7 @@ describe( 'WidgetTypeAround', () => {
 		}
 	} );
 
-	describe( 'insertContent integration', () => {
+	describe( 'Model#insertContent() integration', () => {
 		let model, modelSelection;
 
 		beforeEach( () => {
@@ -1370,7 +1370,7 @@ describe( 'WidgetTypeAround', () => {
 			expect( batchSet.size ).to.be.equal( 1 );
 		} );
 
-		it( 'should not alter insertContent when "fake caret" is not active', () => {
+		it( 'should not alter insertContent when the "fake caret" is not active', () => {
 			setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]<paragraph>baz</paragraph>' );
 
 			const batchSet = setupBatchWatch();
@@ -1384,7 +1384,7 @@ describe( 'WidgetTypeAround', () => {
 			expect( batchSet.size ).to.be.equal( 1 );
 		} );
 
-		it( 'should handle insertContent before widget when it\'s the first element', () => {
+		it( 'should handle insertContent before a widget when it\'s the first element of the root', () => {
 			setModelData( editor.model, '[<blockWidget></blockWidget>]' );
 
 			const batchSet = setupBatchWatch();
@@ -1400,7 +1400,7 @@ describe( 'WidgetTypeAround', () => {
 			expect( batchSet.size ).to.be.equal( 1 );
 		} );
 
-		it( 'should handle insertContent after widget when it\'s the last element', () => {
+		it( 'should handle insertContent after a widget when it\'s the last element of the root', () => {
 			setModelData( editor.model, '[<blockWidget></blockWidget>]' );
 
 			const batchSet = setupBatchWatch();
@@ -1416,7 +1416,7 @@ describe( 'WidgetTypeAround', () => {
 			expect( batchSet.size ).to.be.equal( 1 );
 		} );
 
-		it( 'should handle insertContent before widget when it\'s not the first element', () => {
+		it( 'should handle insertContent before a widget when it\'s not the first element of the root', () => {
 			setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' );
 
 			const batchSet = setupBatchWatch();
@@ -1432,7 +1432,7 @@ describe( 'WidgetTypeAround', () => {
 			expect( batchSet.size ).to.be.equal( 1 );
 		} );
 
-		it( 'should handle insertContent after widget when it\'s not the last element', () => {
+		it( 'should handle insertContent after a widget when it\'s not the last element of the root', () => {
 			setModelData( editor.model, '[<blockWidget></blockWidget>]<paragraph>foo</paragraph>' );
 
 			const batchSet = setupBatchWatch();