ckeditor5-angular icon indicating copy to clipboard operation
ckeditor5-angular copied to clipboard

React to component property changes

Open ma2ciek opened this issue 3 years ago • 1 comments

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 the change property listener updates the data in the parent component, the infinite loop / unnecessary data setting does not occur.

ma2ciek avatar Jun 25 '21 15:06 ma2ciek

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.

pomek avatar Jun 30 '21 16:06 pomek

Closing due to https://github.com/ckeditor/ckeditor5-angular/issues/264#issuecomment-871531690.

pomek avatar Jul 25 '23 09:07 pomek