Skip to content

Commit

Permalink
Merge pull request #13214 from ckeditor/ck/13213-ckfinder-track-changes
Browse files Browse the repository at this point in the history
Feature (track-changes): Add track changes integration for CKFinder feature.

Other (ckfinder): Set correct value (`false`) for `CKFinderCommand#affectsData`. Now, the command's state depends only on related commands (`insertImage` and `link`). Closes #13213.
  • Loading branch information
scofalik authored Jan 9, 2023
2 parents ba63580 + 3c23f8f commit 1b95b17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/ckeditor5-ckfinder/src/ckfindercommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ export default class CKFinderCommand extends Command {
constructor( editor ) {
super( editor );

// The CKFinder command does not affect data by itself.
this._affectsData = false;

// Remove default document listener to lower its priority.
this.stopListening( this.editor.model.document, 'change' );

Expand Down
6 changes: 6 additions & 0 deletions packages/ckeditor5-ckfinder/tests/ckfindercommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,4 +455,10 @@ describe( 'CKFinderCommand', () => {
mockFinderEvent( 'files:choose', data );
}
} );

describe( '_affectsData', () => {
it( 'does not affect data', () => {
expect( command._affectsData ).to.be.false;
} );
} );
} );

0 comments on commit 1b95b17

Please sign in to comment.