In my schema I have a
figure node, defined as
block. It contains an image (in my case that is a React component) and a
figcaption, which acts as container for editable text content. In regard to the figcaption, the whole thing behaves like a normal block text node (e.g. ‘paragraph’). But when I click on the image, I would like the whole figure to get selected, which does not happen, by default.
Is that intended behavior ? I guess yes, at least that is how the block nodes from basic schema behave.
So right now I am experimenting with an ugly hack, to listen for click event at the dom node of the image, and from there I programmatically select the figure.
Is there a better way to do this ?