wontlost-ltd / vaadin-litelement-ckeditor

Vaadin14+LitElement+CKEditor5
Other
17 stars 13 forks source link

ValueChangeEvent doesn't work as expected #60

Open kevinkendzia opened 6 months ago

kevinkendzia commented 6 months ago

I tried using the editor in my app but ran into problems reacting to user changes.

isFromClient() of a ValueChangeEvent seems to always return false regardless of wether I changed something on clientside or not. Also the event is triggered on multiple occasions:

I know the editor replaces tags like \ (Bold-Tag) with \ (String-Tag) and seems to trigger valueChanges because of this, but can I distinguish between this correction and a actual user change?

My goal is, to only react to valueChanges explicitly triggered by user input.

This is a minimal vaadin starter showing my problem: ckeditorvaluechange.zip

eroself commented 6 months ago

Thanks for your interest to this addon. Yes, will change the part of isFromClient. Regarding distinguish between this correction and a actual user change, it's not supported.