From f0e20c676afcb8b2bb40ec335fa46d320409a550 Mon Sep 17 00:00:00 2001 From: Adnan Saiyed Date: Wed, 20 Dec 2023 13:07:03 +0000 Subject: [PATCH] [FIX] web_editor: clear format missing from editor toolbar Current behaviour before commit: In v16.0 and above clear format button was missing from snippet toolbar. Desired behaviour after commit: Now clear format button is getting appeared in snippet toolbar. task-3638147 closes odoo/odoo#150620 X-original-commit: 701bbe40554ea9b6867171a755124fe5b635988b Signed-off-by: Antoine Guenet (age) --- addons/web_editor/static/src/js/editor/snippets.editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js index dd6ca884ff7..e95546939bb 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -4415,7 +4415,8 @@ var SnippetsMenu = Widget.extend({ const customizeTableBlock = renderToElement('web_editor.toolbar.table-options'); this.options.wysiwyg.odooEditor.bindExecCommand(customizeTableBlock); $(this.customizePanel).append(customizeTableBlock); - $title.append(this._toolbarWrapperEl.querySelector('#removeFormat')); + this._removeFormatButton = this._removeFormatButton || this._toolbarWrapperEl.querySelector('#removeFormat'); + $title.append(this._removeFormatButton); this._$toolbarContainer.append(this._toolbarWrapperEl); this._checkEditorToolbarVisibility();