ckeditor5-angular
ckeditor5-angular copied to clipboard
the [data]="text" property not updates if text variable was changed
Hello guys. I noticed some interesting behavior with ckeditor5-angular. So regular template of the editor:
<ckeditor
[config]="config"
[data]="text"
[editor]="Editor"
(change)="handleChange($event)"
></ckeditor>
if the text property was changed by @Input()
after the config is set - so text can't be changed inside the editor anymore.
For example:
I set up the field. set the config. text is still undefined
. Editor loads with no text inside.
The @Input()
receive variable text
changes - and there some text already. But it isn't going forward to the <ckeditor>
component. It does not affect this change of [data] unfortunately. As for me - it happened because change detection does not work as should inside
<ckeditor
[config]="config"
[(ngModel)]="text"
[editor]="Editor"
(change)="handleChange($event)"
></ckeditor>
and it will be automatically updated/bound/etc, but - the question is - is it a non-overengineering way for this case? or do we need to have the working DI there? Am I wrong?
@ma2ciek, can you take a look at it?
This is my question as well.
Sorry guys for the late response, I'll take a look.
any update on this
has anyone solved this problem?
This topic is quite large (detecting the input properties changes) and the data
property is not the only one that can be changed runtime. I reported this issue in #264.
Hi guys, soon 1 year anniversary of this case. Nothing special, but I think any dev meet this issue want to ask why so obvious bugs don't fix for so long time? there no problem with runtime, it's just about data binding. Anyway, hope you will resolve this issue sometime.