Skip to content

Commit

Permalink
WEBUI-1616: quill js rtl
Browse files Browse the repository at this point in the history
  • Loading branch information
rakeshkumar1019 committed Jan 16, 2025
1 parent 8b6563b commit 46633bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/widgets/nuxeo-html-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,10 @@ import { I18nBehavior } from '../nuxeo-i18n-behavior.js';

ready() {
super.ready();
if (!this.hasAttribute('dir')) {
const direction = document.documentElement.getAttribute('dir');
this.setAttribute('dir', direction);
}
// init editor
const { placeholder, readOnly } = this;
const modules = { toolbar: '#toolbar' };
Expand Down
4 changes: 4 additions & 0 deletions ui/widgets/quill/quill-snow.js
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,10 @@ const template = html`
top: 50%;
width: 18px;
}
:host([dir='rtl']) .ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg {
left: 0;
right: auto;
}
.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=''])::before,
.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=''])::before,
Expand Down

0 comments on commit 46633bf

Please sign in to comment.