Skip to content
This repository has been archived by the owner on Jun 26, 2020. It is now read-only.

T/86 InputCommand should accept range instead of position as a parameter. #88

Merged
merged 7 commits into from
Mar 13, 2017

Conversation

f1ames
Copy link
Contributor

@f1ames f1ames commented Mar 13, 2017

Fix: InputCommand now accepts Range instead of Position as a parameter. Closes ckeditor/ckeditor5#3082. Closes ckeditor/ckeditor5#3061.

BREAKING CHANGE: InputCommand options.resultPosition was replaced with options.resultRange.


Additional information

This fixes ckeditor/ckeditor5#3061, however in a way it works now same as natively in Safari - after correction the whole word is selected.

/* globals console, window, document */

import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classic';
import Enter from '@ckeditor/ckeditor5-enter/src/enter';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the essential preset + paragraph instead of these 4 plugins.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can also update all other manual tests.

@Reinmar
Copy link
Member

Reinmar commented Mar 13, 2017

Two things:

  • let's switch to using the essentials preset (remember to add it as a dev dependency),
  • I can see you didn't have to change any test after changing the option name which means that there's no test for it in the command's tests ;>

Other than that, everything works fine, so you can merge the ticket (don't forget to copy the message) once you fix the tests.

@f1ames
Copy link
Contributor Author

f1ames commented Mar 13, 2017

Ok, manual tests updated to use essentials preset. Added 2 unit tests covering resultRange.

@f1ames f1ames merged commit 0766407 into master Mar 13, 2017
@f1ames f1ames deleted the t/86 branch March 23, 2017 10:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants