diff options
| author | Benjamin Vray <bvr@odoo.com> | 2020-12-04 09:44:48 +0000 |
|---|---|---|
| committer | Benjamin Vray <bvr@odoo.com> | 2020-12-04 15:04:04 +0000 |
| commit | 334bf078a4bfd600e1be4b22fc2511ca58aa4e94 (patch) | |
| tree | d2d2779cac923df0692105fadcf5250950cf66e8 /addons/website_forum | |
| parent | df73b63bd73b52716c2b4d0b5c42962afe081be3 (diff) | |
[FIX] website_forum, website_profile: disable editor toolbar options
Before this commit, the inline style added with some options of the
editor toolbar when editing a textarea was removed due to the
strip_style of the content field.
Since we cannot remove this strip_style for security reasons, we can
only disable options that add inline style.
This commit closes #34288
closes odoo/odoo#62906
X-original-commit: 74e4114e20186e31343af12a673fa3e4bc4eac4a
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Diffstat (limited to 'addons/website_forum')
| -rw-r--r-- | addons/website_forum/static/src/js/website_forum.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/addons/website_forum/static/src/js/website_forum.js b/addons/website_forum/static/src/js/website_forum.js index 7c084751d52..46b6a389c5d 100644 --- a/addons/website_forum/static/src/js/website_forum.js +++ b/addons/website_forum/static/src/js/website_forum.js @@ -119,6 +119,8 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({ var editorKarma = $textarea.data('karma') || 0; // default value for backward compatibility var $form = $textarea.closest('form'); var hasFullEdit = parseInt($("#karma").val()) >= editorKarma; + // Warning: Do not activate any option that adds inline style. + // Because the style is deleted after save. var toolbar = [ ['style', ['style']], ['font', ['bold', 'italic', 'underline', 'clear']], @@ -141,6 +143,7 @@ publicWidget.registry.websiteForum = publicWidget.Widget.extend({ res_model: 'forum.post', res_id: +window.location.pathname.split('-').pop(), }, + disableResizeImage: true, }; if (!hasFullEdit) { options.plugins = { |
