Currently, I am developing a Vue project that involves the use of ckeditor5 as a text editor. Pusher, a real-time API utilizing websockets, is used to broadcast events to other Pusher instances in real time. Learn more about Pusher here.
Within the ckeditor configuration, I have included a set
callback. This callback is triggered on any text change and is utilized to send pusher events, broadcasting the text value to other instances of Pusher.
An issue arises when the receiving Pusher instance processes the event and Vue updates the text value in the DOM reactively. This then triggers the set
callback once again, resulting in text flickering in the real-time environment.
As I only receive a string value in the callback, I am unable to determine what initiated it and therefore cannot prevent the execution.
Is there a method to prevent ckeditor5 from triggering the callback?
This issue may be present in any project utilizing websockets.