summaryrefslogtreecommitdiff
path: root/addons/website/static/lib/summernote/src
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@odoo.com>2015-03-23 10:20:27 +0100
committerChristophe Matthieu <chm@odoo.com>2015-03-23 12:25:06 +0100
commit2f5e4149fbaa1cbd832541f1f5849a9ed65d931e (patch)
treed2b218798eff56c73524d4073736d6f63cdad635 /addons/website/static/lib/summernote/src
parent421693d95253d55efca20c361f50def6f212cf22 (diff)
[FIX] summernote: wrap the content with p when the user keyup on 'enter' but should not wrap the content if the editable area is a p, li or other para
Diffstat (limited to 'addons/website/static/lib/summernote/src')
-rw-r--r--addons/website/static/lib/summernote/src/js/core/range.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/website/static/lib/summernote/src/js/core/range.js b/addons/website/static/lib/summernote/src/js/core/range.js
index ea37337f27c..aa72cd31e55 100644
--- a/addons/website/static/lib/summernote/src/js/core/range.js
+++ b/addons/website/static/lib/summernote/src/js/core/range.js
@@ -474,6 +474,11 @@ define([
return this.normalize();
}
+ // if apply the editor to a P, LI...
+ if (dom.isText(sc) && /^P|^LI|^H[1-7]/.test(sc.parentNode.nodeName.toUpperCase())) {
+ return this.normalize();
+ }
+
// find inline top ancestor
var topAncestor;
if (dom.isInline(sc)) {