Urgent : Duplicate other blocks when used custom asset manager
Hello, We have modified the Assset manager with custom one. But we are having problem now. If we drop one image into canvase and then add any other component , it will duplicate that component. If we add another image then it would triplet other component.
Can you please help us. Below is the code snippet that we have used to open our custom asset manager.
editor.Commands.add('open-assets', {
run: function (editor, sender, opts)
{
var classofelement = opts.target.attributes.property == "background-image" ? "wrapper" : opts.target.cid;
AjaxRequestStart();
$.ajax({
url: '@Url.Action("FilesForm", "File")',
type: 'POST',
dataType: "html",
contentType: "application/json; charset=utf-8",
data: JSON.stringify({ classOfSelectedElement: classofelement }),
success: function (result) {
editor.Modal.open();
$("#gjs-mdl-c").html(result);
},
error: function (err, xhr, thrownError) {
},
complete: function () {
AjaxRequestEnd();
}
});
}
});
If you get duplicate components only when using your custom Asset Manager, well you should check how you assign the src, I can't help you more
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.