[FIX] web_editor: remove style attribute if empty

This commit is contained in:
Christophe Matthieu
2016-01-28 14:57:21 +01:00
parent 28e2dcf043
commit 2b4fb7e195
@@ -173,7 +173,11 @@ var class_to_style = function ($editable) {
style = k+":"+v+";"+style;
}
});
$target.attr("style", style);
if (_.isEmpty(style)) {
$target.removeAttr("style");
} else {
$target.attr("style", style);
}
});
};
// convert style into inline class from mail