ckeditor / ckeditor4-angular

Official CKEditor 4 Angular component.
Other
55 stars 32 forks source link

Clean up editor types #133

Closed Dumluregn closed 3 years ago

Dumluregn commented 4 years ago

EDIT: This PR now removes the divarea editor type instead.

Proposed changelog entry (2.0.0):

* [#130](https://github.com/ckeditor/ckeditor4-angular/issues/130): `Divarea` is no longer treated as the separate editor type. [`divarea` plugin](https://ckeditor.com/cke4/addon/divarea) can still be used just by adding it to the custom configuration. 

This PR contains: - API docs fix (update info that classic editor is the default one, not divarea); - tests fix (tests for warning messages were failing); - mechanism adding floatingspace plugin to the build if it is in removePlugins config and the editor type is inline (so analogous to the divarea editor type) together with unit tests; - some minor refactoring.

I'd say there is still some code that could use a refactor (e.g. removePlugin() method), but it wasn't the subject of this PR so I didn't touch it now.

Short note about tests - changing from beforeEach() to beforeAll() (which was reverting the recent change introduced in https://github.com/ckeditor/ckeditor4-angular/commit/ebf6aed2f7db7866747b8121f50773043e64a2dd) was necessary as the config was changing after it was passed to the component. Now the config is updated properly, i.e. before the describe() block that contains it. And it is separate for each editor type and each config suit, so everything works fine.

Closes #130.

f1ames commented 4 years ago

I don't really remember what was the resolution of our discussion on how we should handle deprecating divarea editor type. However, if we would like to follow #130 we should just drop the whole logic responsible for adding divarea plugin and throw warring in case of this type, that it's no longer supported and the developer should use divarea plugin instead.

I think the conclusion was that we can do #127 easily ("just" clean up warnings) and it's main goal is to have green CI. And #130 is about deprecating/removing diveare editor type. That was the reason we split it into two task I suppose.

If it turns out that it doesn't make sense to cover #127 separately from #130 we may try to cover both :thinking: