Urgent : Duplicate other blocks when used custom asset manager
Question
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();
}
});
}
});Answers (2)
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.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1715
Hello, I am new to your project, but I love it. I have a small issue with image attributes.
I added two new traits to the trait manager for images. Width and height. I added it as a plugin following your example. It totally works a...
Issue #1044
change src for image element in model
hello when a image block drop to editor i hide the default asset manager and display my custom asset manager: fot this i have no problem.bu...
Issue #661
Class attribute not removed
Hello ! I noticed a problem with style manager when we add/remove classes. When we remove all classes it doesn't remove then from the gener...
Issue #1325
How to disable drop for specific blocks/components
Hello, with the following code we are able to indicate if it's possible to drop other component(blocks) inside that particular component......
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.