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

Changed enqueueChange to change.

Oskar Wróbel пре 8 година
родитељ
комит
eda4c3bcf6

+ 1 - 1
packages/ckeditor5-link/src/linkcommand.js

@@ -57,7 +57,7 @@ export default class LinkCommand extends Command {
 		const model = this.editor.model;
 		const model = this.editor.model;
 		const selection = model.document.selection;
 		const selection = model.document.selection;
 
 
-		model.enqueueChange( writer => {
+		model.change( writer => {
 			// If selection is collapsed then update selected link or insert new one at the place of caret.
 			// If selection is collapsed then update selected link or insert new one at the place of caret.
 			if ( selection.isCollapsed ) {
 			if ( selection.isCollapsed ) {
 				const position = selection.getFirstPosition();
 				const position = selection.getFirstPosition();

+ 1 - 1
packages/ckeditor5-link/src/unlinkcommand.js

@@ -35,7 +35,7 @@ export default class UnlinkCommand extends Command {
 		const model = this.editor.model;
 		const model = this.editor.model;
 		const selection = model.document.selection;
 		const selection = model.document.selection;
 
 
-		model.enqueueChange( writer => {
+		model.change( writer => {
 			// Get ranges to unlink.
 			// Get ranges to unlink.
 			const rangesToUnlink = selection.isCollapsed ?
 			const rangesToUnlink = selection.isCollapsed ?
 				[ findLinkRange( selection.getFirstPosition(), selection.getAttribute( 'linkHref' ) ) ] : selection.getRanges();
 				[ findLinkRange( selection.getFirstPosition(), selection.getAttribute( 'linkHref' ) ) ] : selection.getRanges();