ckeditor5-angular
ckeditor5-angular copied to clipboard
React to component property changes
Currently only the disabled
property can be changed at runtime. Other properties are "immutable", their changes aren't tracked so the component operates only on the passed initial values.
We should determine which properties should be changeable, how a property change should affect the component, and document the behavior. We could try to make the component work similarly to the https://github.com/ckeditor/ckeditor5-react in this area.
Connected issues:
- #188 Configuration update should restart the editor and create it based on the new configuration.
- #215 The
data
property update should make an effect on the editor data.- potential problem: 2-way binding with the
change
emitter - we should make sure that when both props are specified and thechange
property listener updates thedata
in the parent component, the infinite loop / unnecessary data setting does not occur.
- potential problem: 2-way binding with the
In the React component, we handle all properties except the #data
one. See: https://github.com/ckeditor/ckeditor5-react/blob/929d4e26bd261bd90d60f2fb0798d0e18e0cf89a/tests/ckeditor.jsx#L335-L357.
Closing due to https://github.com/ckeditor/ckeditor5-angular/issues/264#issuecomment-871531690.