[FIX] website summernote: code, quote formatblock not work properly and split the selection like other formating

This commit is contained in:
Christophe Matthieu
2015-02-12 15:08:11 +01:00
parent 126282f810
commit e941bab124
@@ -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++) {