react-email-editor: registerCallback with selectImage stopped working

This is in react:

  import EmailEditor, { UnlayerOptions } from "react-email-editor";

  ...

  const internalOnReady = () => {
    emailEditorRef.current.editor.registerCallback("selectImage", (a, b) =>
      console.log("registering callback"),
    );
  };

  ...

<EmailEditor ref={emailEditorRef} onReady={internalOnReady} />

The selectImage callback is not called when clicking the Image upload button. This used to work fine a few days ago.

About this issue

Most upvoted comments

@Arsenalist @Keshavdulal Using version 1.157.0 seems to fix the issue. It will load this editor: https://editor.unlayer.com/1.157.0/editor.html instead of the latest version. Hopefully they don’t remove this version 😃

<EmailEditor ref={emailEditorRef} onLoad={onLoad} onReady={onReady} options={{version: '1.157.0'}} />

@roy-rayyone Thanks a lot! It’s working perfectly now.

@Arsenalist @Keshavdulal Using version 1.157.0 seems to fix the issue. It will load this editor: https://editor.unlayer.com/1.157.0/editor.html instead of the latest version. Hopefully they don’t remove this version 😃

<EmailEditor ref={emailEditorRef} onLoad={onLoad} onReady={onReady} options={{version: '1.157.0'}} />

Thanks a lot @roy-rayyone its working with this version change.

@pnp-os are you using a paid version? Seems like unlayer moved custom storage, and image library to paid version. My custom image storage was working previously, but recently stopped working. https://unlayer.com/pricing