Skip to content

Instantly share code, notes, and snippets.

@agrogeek
Created August 7, 2019 07:57
Show Gist options
  • Save agrogeek/3c0aca2931bf6e2a24f64959b9b9661d to your computer and use it in GitHub Desktop.
Save agrogeek/3c0aca2931bf6e2a24f64959b9b9661d to your computer and use it in GitHub Desktop.
Fix Elementor edit panel error
/**
* Convert html into correct element
* @param html
*/
html2element:function(html) {
var $template, attributes = {},
template = html;
$template = $(template(this.model.toJSON()).trim()), _.each($template.get(0).attributes, function(attr) {
attributes[attr.name] = attr.value
}), this.$el.attr(attributes).html($template.html()), this.setContent(), this.renderContent()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment