JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
don't leave empty style attributes
authorJason Woofenden <jason@jasonwoof.com>
Wed, 17 May 2017 05:21:53 +0000 (01:21 -0400)
committerJason Woofenden <jason@jasonwoof.com>
Wed, 17 May 2017 05:21:53 +0000 (01:21 -0400)
editor.js

index 0c9cf46..e4ab024 100644 (file)
--- 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) {