diff options
| author | Christophe Matthieu <chm@odoo.com> | 2015-02-12 12:22:59 +0100 |
|---|---|---|
| committer | Christophe Matthieu <chm@odoo.com> | 2015-02-12 15:08:11 +0100 |
| commit | e941bab124e6744e1dd49462b70b4da9b9b1b7d4 (patch) | |
| tree | 7e0d0d6bcb3921efa005256255c24d35ec20fd23 /addons/website/static/src/js/summernote.js | |
| parent | 126282f8105985db8901b30ff491b251fe4e627c (diff) | |
[FIX] website summernote: code, quote formatblock not work properly and split the selection like other formating
Diffstat (limited to 'addons/website/static/src/js/summernote.js')
| -rw-r--r-- | addons/website/static/src/js/summernote.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/website/static/src/js/summernote.js b/addons/website/static/src/js/summernote.js index 167459e6a7c..154c98cd61e 100644 --- a/addons/website/static/src/js/summernote.js +++ b/addons/website/static/src/js/summernote.js @@ -1701,6 +1701,12 @@ define(['summernote/editing/Editor', 'summernote/summernote'], function (Editor) } r.reRange().select(); + if (sTagName === "blockquote" || sTagName === "pre") { + sTagName = $.summernote.core.agent.isMSIE ? '<' + sTagName + '>' : sTagName; + document.execCommand('FormatBlock', false, sTagName); + return; + } + // fix by odoo because if you select a style in a li with no p tag all the ul is wrapped by the style tag var nodes = dom.listBetween(r.sc, r.ec); for (var i=0; i<nodes.length; i++) { |
