This repository was archived by the owner on Jun 26, 2020. It is now read-only.
Commit e7f8467
authored
Merge pull request #1585 from ckeditor/t/1555
Other: Moved `Position`, `Range` and `Selection` factories from those classes to the model/view writers and `Model`/`View` instances. Previously, those factories were available as static methods of the `Position`, `Range` and `Selection` classes which meant that you needed to import those classes to your plugin's code to create new instances. That required your package to depend on `@ckeditor/ckeditor5-engine` and was not very useful in general. After this change, you can create instances of those classes without importing anything. See the "Breaking changes" section for more details. Closes #1555.
BREAKING CHANGE: The model `Position.createAt()` method was removed from the public API. Use `writer.createPositionAt()` instead. This method is also available on the `Model` instance.
BREAKING CHANGE: The model `Position.createAfter()` method was removed from the public API. Use `writer.createPositionAfter()` instead. This method is also available on the `Model` instance.
BREAKING CHANGE: The model `Position.createBefore()` method was removed from the public API. Use `writer.createPositionBefore()` instead. This method is also available on the `Model` instance.
BREAKING CHANGE: The model `Position.createFromPosition()` method was removed. Use `writer.createPositionAt( position )` to create a new position instance. This method is also available on the `Model` instance.
BREAKING CHANGE: The model `Position.createFromParentAndOffset()` method was removed. Use `writer.createPositionAt( parent, offset )` instead. This method is also available on the `Model` instance.
BREAKING CHANGE: The model `Range.createIn()` method was removed from the public API. Use `writer.createRangeIn()` instead. This method is also available on the `Model` instance.
BREAKING CHANGE: The model `Range.createOn()` method was removed from the public API. Use `writer.createRangeOn()` instead. This method is also available on the `Model` instance.
BREAKING CHANGE: The model `Range.createFromRange()` method was removed from the public API.
BREAKING CHANGE: The model `Range.createFromParentsAndOffsets()` method was removed from the public API.
BREAKING CHANGE: The model `Range.createFromPositionAndShift()` method was removed from the public API.
BREAKING CHANGE: The model `Range.createCollapsedAt()` method removed method was removed. Use `writer.createRange( position )` to create collapsed range. This method is also available on the `Model` instance.
BREAKING CHANGE: The model `Range.createFromRanges()` method was removed from the public API.
BREAKING CHANGE: The view `Position.createAt()` method was removed from the public API. Use `writer.createPositionAt()` instead. This method is also available on the `View` instance.
BREAKING CHANGE: The view `Position.createAfter()` method was removed from the public API. Use `writer.createPositionAfter()` instead. This method is also available on the `View` instance.
BREAKING CHANGE: The view `Position.createBefore()` method was removed from the public API. Use `writer.createPositionBefore()` instead. This method is also available on the `View` instance.
BREAKING CHANGE: The view `Position.createFromPosition()` method was removed. Use `writer.createPositionAt( position )` to create a new position instance. This method is also available on the `View` instance.
BREAKING CHANGE: The view `Range.createIn()` method was removed from the public API. Use `writer.createRangeIn()` instead. This method is also available on the `View` instance.
BREAKING CHANGE: The view `Range.createOn()` method was removed from the public API. Use `writer.createRangeOn()` instead. This method is also available on the `View` instance.
BREAKING CHANGE: The view `Range.createFromRange()` method was removed from the public API.
BREAKING CHANGE: The view `Range.createFromPositionAndShift()` method was removed from the public API.
BREAKING CHANGE: The view `Range.createFromParentsAndOffsets()` method was removed from the public API.
BREAKING CHANGE: The view `Range.createCollapsedAt()` method removed method was removed. Use `writer.createRange( position )` to create a collapsed range. This method is also available on the `View` instance.File tree
118 files changed
+2922
-1870
lines changed- src
- controller
- conversion
- dev-utils
- model
- operation
- utils
- view
- tests
- controller
- conversion
- dev-utils
- manual
- tickets
- 475
- ckeditor5-721
- model
- _utils
- operation
- transform
- utils-tests
- utils
- tickets
- utils
- view
- domconverter
- downcastwriter
- manual
- observer
- view
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
118 files changed
+2922
-1870
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
300 | | - | |
| 300 | + | |
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
| |||
535 | 534 | | |
536 | 535 | | |
537 | 536 | | |
538 | | - | |
| 537 | + | |
539 | 538 | | |
540 | 539 | | |
541 | 540 | | |
542 | 541 | | |
543 | 542 | | |
544 | 543 | | |
545 | | - | |
| 544 | + | |
546 | 545 | | |
547 | 546 | | |
548 | 547 | | |
| |||
628 | 627 | | |
629 | 628 | | |
630 | 629 | | |
631 | | - | |
| 630 | + | |
632 | 631 | | |
633 | 632 | | |
634 | 633 | | |
| |||
903 | 902 | | |
904 | 903 | | |
905 | 904 | | |
906 | | - | |
| 905 | + | |
907 | 906 | | |
908 | 907 | | |
909 | 908 | | |
| |||
965 | 964 | | |
966 | 965 | | |
967 | 966 | | |
968 | | - | |
| 967 | + | |
969 | 968 | | |
970 | 969 | | |
971 | 970 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | | - | |
| 134 | + | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
| 346 | + | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
358 | 357 | | |
359 | 358 | | |
360 | 359 | | |
361 | | - | |
| 360 | + | |
362 | 361 | | |
363 | 362 | | |
364 | 363 | | |
365 | 364 | | |
366 | 365 | | |
367 | 366 | | |
368 | 367 | | |
369 | | - | |
| 368 | + | |
370 | 369 | | |
371 | 370 | | |
372 | 371 | | |
373 | 372 | | |
374 | | - | |
| 373 | + | |
375 | 374 | | |
376 | 375 | | |
377 | 376 | | |
| |||
380 | 379 | | |
381 | 380 | | |
382 | 381 | | |
383 | | - | |
| 382 | + | |
384 | 383 | | |
385 | 384 | | |
386 | 385 | | |
| |||
602 | 601 | | |
603 | 602 | | |
604 | 603 | | |
605 | | - | |
| 604 | + | |
606 | 605 | | |
607 | 606 | | |
608 | 607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
75 | 78 | | |
76 | 79 | | |
77 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
78 | 84 | | |
79 | 85 | | |
80 | 86 | | |
| |||
372 | 378 | | |
373 | 379 | | |
374 | 380 | | |
375 | | - | |
| 381 | + | |
376 | 382 | | |
377 | 383 | | |
378 | 384 | | |
| |||
385 | 391 | | |
386 | 392 | | |
387 | 393 | | |
388 | | - | |
| 394 | + | |
389 | 395 | | |
390 | 396 | | |
391 | 397 | | |
392 | | - | |
| 398 | + | |
393 | 399 | | |
394 | 400 | | |
395 | | - | |
| 401 | + | |
396 | 402 | | |
397 | 403 | | |
398 | 404 | | |
| |||
419 | 425 | | |
420 | 426 | | |
421 | 427 | | |
422 | | - | |
| 428 | + | |
423 | 429 | | |
424 | 430 | | |
425 | 431 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
311 | 311 | | |
312 | 312 | | |
313 | 313 | | |
314 | | - | |
| 314 | + | |
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
| |||
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
| 172 | + | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
181 | | - | |
| 180 | + | |
| 181 | + | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
391 | 391 | | |
392 | 392 | | |
393 | 393 | | |
394 | | - | |
| 394 | + | |
395 | 395 | | |
396 | | - | |
| 396 | + | |
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
| 423 | + | |
424 | 424 | | |
425 | 425 | | |
426 | 426 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
| 164 | + | |
| 165 | + | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
| |||
0 commit comments