Created
August 7, 2019 07:57
-
-
Save agrogeek/3c0aca2931bf6e2a24f64959b9b9661d to your computer and use it in GitHub Desktop.
Fix Elementor edit panel error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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