-
Notifications
You must be signed in to change notification settings - Fork 173
Description
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