Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

editor.registerCallback not working in load event #119

Open
oguzhanmemis7849 opened this issue Feb 3, 2025 · 4 comments
Open

editor.registerCallback not working in load event #119

oguzhanmemis7849 opened this issue Feb 3, 2025 · 4 comments

Comments

@oguzhanmemis7849
Copy link

oguzhanmemis7849 commented Feb 3, 2025

Hello,

In our project using the vue-email-editor package with Vue, we encountered an issue where the registerCallback function inside the load event is not working properly.
We are using Vue3 and attempting to trigger the registerCallback within the onLoad function when the editor is loaded. However, the callback is not being registered as expected. The code is written as follows

const onLoad = () => {
  emailEditor.value.editor.registerCallback("image", async (file, done) => {
    const formData = new FormData();
    formData.append("document", file.attachments[0]);
    const response = await mailStore.contentFileUpload(formData);
    done({ progress: 100, url: response.ContentFileUrl });
  });
};

EmailEditor.mt-3(
    ref="emailEditor",
    :locale="'tr'",
    :tools="tools",
    @load="onLoad",
    @ready="editorReady"
  )

Even though this function is triggered, registerCallback does not seem to register the image callback, which is causing issues in our integration.

Steps to Reproduce:

  1. Installed vue-email-editor with Vue3.
  2. Implemented the load event to register an image callback.
  3. Tried to trigger the callback within the editor.
  4. Encountered the issue where the registerCallback is not working.

Expected Behavior:
We expect that the registerCallback method should register the callback function for the image upload, allowing us to upload images to our own file storage instead of using Unlayer's default S3 service.

Environment Information:

  • vue-email-editor version: 2.1.4
  • Vue version: 3.2.45
  • Node.js version: 18.20.5
  • Browser: Google Chrome Version 132.0.6834.84 (Official Build) (64-bit)
  • OS: Windows 11 Pro 64-bit

Could you please help us resolve this issue? This problem has been happening for about a week. Before that, the registerCallback method was working.

Thank you,
Oguzhan

@kchebot
Copy link

kchebot commented Feb 3, 2025

Same problem. If you change the editor version to 1.157.0, everything works. Looks like this feature is now paid too

@filipecrosk
Copy link

@kchebot how do you set the editor version? I can't find anything in the docs or project types

Same problem. If you change the editor version to 1.157.0, everything works. Looks like this feature is now paid too

@oguzhanmemis7849
Copy link
Author

@kchebot how can we revert to unlayer version 1.157.0? Since we are using it via vue-email-editor, unlayer is marked as latest.

@kchebot
Copy link

kchebot commented Feb 4, 2025

Here's a link to the documentation
https://docs.unlayer.com/builder/version-management

In vue-email-editor you need to pass version: “1.157.0” in the editor instance options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants