Update original content if display_as is provided #56

Merged
merged 1 commit into from Dec 18, 2011
@@ -193,6 +193,8 @@ BestInPlaceEditor.prototype = {
loadSuccessCallback : function(data) {
var response = $.parseJSON($.trim(data));
if (response != null && response.hasOwnProperty("display_as")) {
+ this.element.attr("data-original-content", this.element.html());
+ this.original_content = this.element.html();
this.element.html(response["display_as"]);
}
this.element.trigger($.Event("ajax:success"), data);