Issue #612Opened December 6, 2017by vishal50330 reactions

Urgent : Duplicate other blocks when used custom asset manager

Question

Code SnippetTEXT
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)

artfDecember 8, 20170 reactions

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

lock[bot]September 18, 20190 reactions

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.