From 7f74e4ade1bf7fd885cc8647b0cd68edd5b599af Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 31 Jul 2013 11:01:51 +0200 Subject: [PATCH 1/2] [FIX] disable automatic insertion of paragraphs in content sections by ckeditor bzr revid: xmo@openerp.com-20130731090151-q0gqmjx50wf6nm2n --- addons/website/static/src/js/website.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index b7efa4d2535..4e5bae1b5b4 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -327,6 +327,8 @@ instance.website.RTE = instance.web.Widget.extend({ customConfig: '', // Disable ACF allowedContent: true, + // Don't insert paragraphs around content in e.g.
  • + autoParagraph: false, }; }, // TODO clean From 444db7145616c0533fe3e1611b1d261f769d0ba5 Mon Sep 17 00:00:00 2001 From: Xavier Morel Date: Wed, 31 Jul 2013 11:15:13 +0200 Subject: [PATCH 2/2] [HACK] filter snippets so ckeditor is not applied to them bzr revid: xmo@openerp.com-20130731091513-u3fklrijeuc6l80a --- addons/website/static/src/js/website.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/website/static/src/js/website.js b/addons/website/static/src/js/website.js index 4e5bae1b5b4..277c9b4143f 100644 --- a/addons/website/static/src/js/website.js +++ b/addons/website/static/src/js/website.js @@ -43,7 +43,10 @@ instance.website.EditorBar = instance.web.Widget.extend({ .parent().show(); // TODO: span edition changing edition state (save button) var $editables = $('[data-oe-model]') - .not('link, script').prop('contentEditable', true) + .not('link, script') + // FIXME: propagation should make "meta" blocks non-editable in the first place... + .not('.oe_snippet_editor') + .prop('contentEditable', true) .addClass('oe_editable'); var $rte_ables = $editables.filter('div, p, li, section, header, footer').not('[data-oe-type]'); var $raw_editables = $editables.not($rte_ables);