From e941bab124e6744e1dd49462b70b4da9b9b1b7d4 Mon Sep 17 00:00:00 2001 From: Christophe Matthieu Date: Thu, 12 Feb 2015 12:22:59 +0100 Subject: [PATCH] [FIX] website summernote: code, quote formatblock not work properly and split the selection like other formating --- addons/website/static/src/js/summernote.js | 6 ++++++ 1 file changed, 6 insertions(+) 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