From c8c8eb3d5652e9834d0ecd5aad907ee359edb657 Mon Sep 17 00:00:00 2001 From: sri-odoo Date: Thu, 29 Aug 2019 13:48:12 +0000 Subject: [IMP] website_forum, *: revamp design MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * web_editor, website_profile Part of https://github.com/odoo/odoo/pull/35749 task-2024197 Co-authored-by: Jérémy Kersten Co-authored-by: qsm-odoo Co-authored-by: fja-odoo --- addons/web_editor/static/src/js/editor/summernote.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'addons/web_editor/static/src/js/editor/summernote.js') diff --git a/addons/web_editor/static/src/js/editor/summernote.js b/addons/web_editor/static/src/js/editor/summernote.js index 3d2c4c205d4..4228d353d1a 100644 --- a/addons/web_editor/static/src/js/editor/summernote.js +++ b/addons/web_editor/static/src/js/editor/summernote.js @@ -3,6 +3,7 @@ odoo.define('web_editor.summernote', function (require) { var core = require('web.core'); require('summernote/summernote'); // wait that summernote is loaded +var weDefaultOptions = require('web_editor.wysiwyg.default_options'); var _t = core._t; @@ -1044,7 +1045,7 @@ options.keyMap.mac['ESCAPE'] = 'cancel'; options.keyMap.mac['UP'] = 'up'; options.keyMap.mac['DOWN'] = 'down'; -options.styleTags = ['p', 'pre', 'small', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'blockquote']; +options.styleTags = weDefaultOptions.styleTags; $.summernote.pluginEvents.insertTable = function (event, editor, layoutInfo, sDim) { var $editable = layoutInfo.editable(); @@ -2083,7 +2084,7 @@ eventHandler.modules.editor.currentStyle = function (target) { return styleInfo; }; -options.fontSizes = [_t('Default'), 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 62]; +options.fontSizes = weDefaultOptions.fontSizes; $.summernote.pluginEvents.applyFont = function (event, editor, layoutInfo, color, bgcolor, size) { var r = range.create(); if (!r) return; @@ -2486,7 +2487,7 @@ function mouseDownChecklist (e) { $lis.addClass('o_checked'); } while ($lis.length); } -}; +} var fn_attach = eventHandler.attach; eventHandler.attach = function (oLayoutInfo, options) { -- cgit v1.2.3