Editor close event hook availability

Tags: #<Tag:0x00007efc605c0b08> #<Tag:0x00007efc605c09c8>

Hi,

I would like to perform some action before or after the editor closes, something opposite of afterBeginEditing and beforeBeginEditing. Is there any hook or method for this action?
I have tried beforeChange and afterChange events but it won’t work when the user presses ESC which does not change the value.

Hi @hjeong1200

We don’t provide any specific hooks on editor’s closing event. If you need to perform some action before the editor closes, then you can use afterBeginEditing. If you could describe your requirements in more details we might be able to propose other solutions.

Hi, @adrian.szymanski,

Thank you for the reply.
I’m using React useState hook to display some component only if the editor is open.
I was able to figure out by using beforeChange and beforeKeyDown to detect editor being closed.
However I’m not happy with the close logic scattered around.
Could you recommend some other solutions?

Hi @hjeong1200

Considering that we don’t provide any dedicated hook for this event I think your solution is probably the best way how it can be currently approached.

1 Like