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

Listen to change:data event to reduce the noise.

Tomek Wytrębowicz пре 5 година
родитељ
комит
5245f7d4c3

+ 1 - 1
packages/ckeditor5-autoformat/src/blockautoformatediting.js

@@ -65,7 +65,7 @@ export default class BlockAutoformatEditing {
 			};
 		}
 
-		editor.model.document.on( 'change', ( evt, batch ) => {
+		editor.model.document.on( 'change:data', ( evt, batch ) => {
 			if ( command && !command.isEnabled || !plugin.isEnabled ) {
 				return;
 			}

+ 1 - 1
packages/ckeditor5-autoformat/src/inlineautoformatediting.js

@@ -151,7 +151,7 @@ export default class InlineAutoformatEditing {
 			writer.removeSelectionAttribute( attributeKey );
 		} );
 
-		editor.model.document.on( 'change', ( evt, batch ) => {
+		editor.model.document.on( 'change:data', ( evt, batch ) => {
 			if ( batch.type == 'transparent' || !plugin.isEnabled ) {
 				return;
 			}