diff options
Diffstat (limited to 'addons/web_editor/static/src/js/summernote.js')
| -rw-r--r-- | addons/web_editor/static/src/js/summernote.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web_editor/static/src/js/summernote.js b/addons/web_editor/static/src/js/summernote.js index cdf4329c0b9..da837d67354 100644 --- a/addons/web_editor/static/src/js/summernote.js +++ b/addons/web_editor/static/src/js/summernote.js @@ -2015,6 +2015,14 @@ eventHandler.modules.editor.currentStyle = function(target) { if(r) styleInfo.image = r.isOnImg(); } + // Fix when the target is a link: the text-align buttons state should + // indicate the alignment of the link in the parent, not the text inside + // the link (which is not possible to customize with summernote). Summernote fixed + // this in their newest version... by just not showing the active button + // for alignments. + if (styleInfo.anchor) { + styleInfo['text-align'] = $(styleInfo.anchor).parent().css('text-align'); + } return styleInfo; } |
