[16.0][ADD] web_richtext_style: add allowCommandJustify option for html field - #1180
Open
n3n wants to merge 3 commits into
Open
[16.0][ADD] web_richtext_style: add allowCommandJustify option for html field#1180n3n wants to merge 3 commits into
n3n wants to merge 3 commits into
Conversation
n3n
force-pushed
the
16.0-imp-richtext-input-custom-style
branch
from
August 22, 2026 15:12
a4ac77a to
321df7a
Compare
…tml field
Adds a new module with a `stickyToolbar` option for the html widget that
pins the richtext toolbar above the editable area instead of the default
floating/autohide behavior.
Usage: options="{'stickyToolbar': true}"
n3n
force-pushed
the
16.0-imp-richtext-input-custom-style
branch
from
August 23, 2026 05:52
d7d472b to
0215bf2
Compare
When stickyToolbar is enabled, always show the justify alignment group in the toolbar. Adds a wysiwyg_patch that rescues #justify from Odoo's default removal (non-snippets mode) by detaching it before _configureToolbar super and re-inserting it after. The patch is idempotent if web_richtext_style is also installed (double-detach produces an empty jQuery set, which is guarded).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
web_richtext_stylethat exposes anallowCommandJustifyoption for thehtmlfield widgetwysiwyg.jsto detach and re-insert the#justifytoolbar group (left/center/right/full) when the option is enabled, bypassing Odoo's default removal of justify in backend (non-snippets) modeHtmlField.extractPropsto forwardallowCommandJustifyfrom the field's XMLoptionsattribute to wysiwygUsage
Test plan
web_richtext_stylehtmlfield that hasoptions="{'allowCommandJustify': true}"text-alignstyles to selected text