Style is not copying after cloning the element after Save
Question
Hi @artf. At the first time before saving the template, When I make one element and clone it, the style is coming in the clonned element. That is running fine. But when I save the template using Ajax and Call the below code:-
const LandingPage = {
html: editor.getHtml(),
css: editor.getCss(),
components: null,
style: null,
};
$.ajax({
type: "POST",
url: BASE_API_URLss+"/api/addTemplateBuilder",
headers: {
'Authorization' : "Bearer " + this.userJson.token
},
data: {
content: LandingPage.html,
css: LandingPage.css,
},
beforeSend: function()
{
$('.save_template_btn').addClass('loading');
},
success: function(response)
{
editor.setComponents(response.content);
editor.setStyle(response.css);
},
error: function(jqXHR, textStatus, errorThrown)
{
}
});
and then clone the elements, their styling does not applies to the cloned elements.
If I comment the editor.setComponents(response.content); and editor.setStyle(response.css); in success
function then styling applies to the cloned elements but still does not style applies to the cloned elements after page refresh after save as editor.setComponents(response.content); and editor.setStyle(response.css); on page load and editor init .

Thanks for help in advance
Answers (2)
Follow the issue template and provide a live demo
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 #1124
Style is not copying after cloning the element
Hi @artf. At the first time before saving the template, When I make one element and clone it, the style is coming in the clonned element. T...
Issue #1232
How to change the margin from px to rem
Hi @artf, Hope you are doing fine. I have changed the margin settings from "px" to "rem" in one of the element using below code: { property...
Issue #1057
Countdown time is not working correctly
Hi artf, I have checked on live website, Countdown time is not working correctly as minute column accept only 0,1,2,4,5 digits only means i...
Issue #1068
Same Traits are not showing When we are rendering the countdown element after saving the template and render again
At the first time, the countdown and its are showing and working fine. But I save the template and then again render the template, but same...
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.