editor.registerCallback not working in load event
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:
- Installed
vue-email-editorwith Vue3. - Implemented the load event to register an image callback.
- Tried to trigger the callback within the editor.
- Encountered the issue where the
registerCallbackis 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
Same problem. If you change the editor version to 1.157.0, everything works. Looks like this feature is now paid too
@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
@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.
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
@kchebot Thank you.
Are you trying to do this?