From: Jason Woofenden Date: Wed, 17 May 2017 05:21:53 +0000 (-0400) Subject: don't leave empty style attributes X-Git-Url: https://jasonwoof.com/gitweb/?p=peach-html5-editor.git;a=commitdiff_plain;h=2424d0277c3130c74e6f0ab84855a653fe7818a5 don't leave empty style attributes --- diff --git a/editor.js b/editor.js index 0c9cf46..e4ab024 100644 --- a/editor.js +++ b/editor.js @@ -1833,7 +1833,7 @@ PeachHTML5Editor.prototype.preserve_space = function(n, ideal_target) { PeachHTML5Editor.prototype.update_style_from_el = function(n) { var style style = n.el.getAttribute('style') - if (style != null) { + if (style != null && style != '') { return n.attrs.style = style } else { if (n.attrs.style != null) {