mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Added bidi button to Squire editor
This commit is contained in:
parent
47e3fc90f2
commit
b2b07ab920
2 changed files with 46 additions and 11 deletions
35
dev/External/SquireUI.js
vendored
35
dev/External/SquireUI.js
vendored
|
|
@ -110,17 +110,29 @@ class SquireUI
|
|||
select: ['11px','13px','16px','20px','24px','30px'],
|
||||
cmd: s => squire.setStyle({ fontSize: s.value })
|
||||
},
|
||||
dir: {
|
||||
select: [
|
||||
[i18n('EDITOR/DIR_LTR', 'LTR'),'ltr'],
|
||||
[i18n('EDITOR/DIR_RTL', 'RTL'),'rtl'],
|
||||
[i18n('EDITOR/DIR_AUTO', 'Auto'),'auto'],
|
||||
['',''],
|
||||
],
|
||||
cmd: s => {
|
||||
squire.setAttribute('dir', s.value || null);
|
||||
// squire.setStyle({ 'unicode-bidi': 'plaintext' });
|
||||
}
|
||||
// dir: {
|
||||
// select: [
|
||||
// [i18n('EDITOR/DIR_LTR', 'LTR'),'ltr'],
|
||||
// [i18n('EDITOR/DIR_RTL', 'RTL'),'rtl'],
|
||||
// [i18n('EDITOR/DIR_AUTO', 'Auto'),'auto'],
|
||||
// ['',''],
|
||||
// ],
|
||||
// cmd: s => {
|
||||
// squire.setAttribute('dir', s.value || null);
|
||||
// // squire.setStyle({ 'unicode-bidi': 'plaintext' });
|
||||
// }
|
||||
// }
|
||||
},
|
||||
dir: {
|
||||
ltr: {
|
||||
html: '⁋',
|
||||
cmd: () => squire.bidi('ltr'),
|
||||
hint: 'ltr direction'
|
||||
},
|
||||
rtl: {
|
||||
html: '¶',
|
||||
cmd: () => squire.bidi('rtl'),
|
||||
hint: 'rtl direction'
|
||||
}
|
||||
},
|
||||
colors: {
|
||||
|
|
@ -278,6 +290,7 @@ class SquireUI
|
|||
|
||||
plain.className = 'squire-plain';
|
||||
wysiwyg.className = 'squire-wysiwyg';
|
||||
wysiwyg.dir = 'auto';
|
||||
this.mode = ''; // 'plain' | 'wysiwyg'
|
||||
this.__plain = {
|
||||
getRawData: () => this.plain.value,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue