I’m trying to create an editor plugin that replaces images that fails to load with a broken image graphic.
I’ve looked at using decorators but see no way to access the dom node from there to attach an
onerror event listener. I’ve looked at attaching it in the
toDOM method of my schema but that seems wrong, and I’m not sure how I would go about updating the state from there.
Anyone have suggestions on how to best implement such a feature?