Skip to content

Commit

Permalink
Add support for numbered and bulleted lists in mail editor
Browse files Browse the repository at this point in the history
  • Loading branch information
iliajie committed Oct 3, 2023
1 parent ac9a70a commit ea3d4eb
Show file tree
Hide file tree
Showing 51 changed files with 241 additions and 174 deletions.
2 changes: 1 addition & 1 deletion extensions/mail/mail.min.css

Large diffs are not rendered by default.

Binary file modified extensions/mail/mail.min.css.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion extensions/mail/mail.min.js

Large diffs are not rendered by default.

Binary file modified extensions/mail/mail.min.js.gz
Binary file not shown.
38 changes: 32 additions & 6 deletions extensions/mail/mail.src.js
Original file line number Diff line number Diff line change
Expand Up @@ -1595,25 +1595,51 @@ const mail = (function() {
}
};

// Editor Google Mail like keybind for quoting
// Editor Google Mail like key bind for creating numbered list
editor.this.keyboard.addBinding({
key: '9',
key: '7',
shiftKey: true,
ctrlKey: !_.platform.mac,
metaKey: _.platform.mac,
format: ['blockquote'],
}, function(range, context) {
this.quill.format('blockquote', false);
const currentFormat = this.quill.getFormat(range.index);
if (currentFormat.list === 'ordered') {
this.quill.format('list', false);
} else {
this.quill.format('list', 'ordered');
}
});

// Editor Google Mail like key bind for creating bullet list
editor.this.keyboard.addBinding({
key: '9',
key: '8',
shiftKey: true,
ctrlKey: !_.platform.mac,
metaKey: _.platform.mac,
}, function(range, context) {
this.quill.format('blockquote', true);
const currentFormat = this.quill.getFormat(range.index);
if (currentFormat.list === 'bullet') {
this.quill.format('list', false);
} else {
this.quill.format('list', 'bullet');
}
});

// Editor Google Mail like key bind for quoting
editor.this.keyboard.addBinding({
key: '9',
shiftKey: true,
ctrlKey: !_.platform.mac,
metaKey: _.platform.mac,
}, function(range, context) {
const currentFormat = this.quill.getFormat(range.index);
if (currentFormat.blockquote) {
this.quill.format('blockquote', false);
} else {
this.quill.format('blockquote', true);
}
});

// Event for external insert link to editor button
ctl_lnk.addEventListener('click', () => {
tb.querySelector(`.${classes.editor.tb_link}`).dispatchEvent(new Event('click'));
Expand Down
9 changes: 5 additions & 4 deletions lang/af.auto
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ settings_right_theme_left_extensions_title=Tema-uitbreidings-redakteur
settings_right_theme_left_logo_title=Tema-logo beheer
settings_right_theme_configurable_options_title=Opstelbare opsies vir outentieke tema

settings_right_hotkey_options=Sneltoetse

settings_right_hotkey_custom_options_description=Gepasmaakte skakels stel jou in staat om syfers van <code>1</code> tot <code>9</code> te gebruik om vinnig toegang tot enige geldige paneel <code>URL</code> te verkry. Die <code>URL</code> kode> kan uit die tans oopgemaakte bladsy onttrek word. Byvoorbeeld, om vinnig oor te skakel na Apache-module, stel <code>apache</code> na <code>Gepasmaakte skakel 1</code>-veld. As die verstek wysiger sleutel gestel is op <code>Alt,</code>, klik op <code>Alt + 1</code>, sal jou Apache-module oopmaak.
settings_hotkey_custom_1_user=Pasgemaakte skakel <code>1</code>
settings_hotkey_custom_2_user=Pasgemaakte skakel <code>2</code>
Expand Down Expand Up @@ -1154,6 +1152,7 @@ settings_right_sysinfo_page_options=Dashboard en intydse monitering
settings_right_navigation_menu_options=Navigasiekieslys
settings_right_notification_slider_options=Sy-skuifbalk
settings_right_table_options=Tafeluitstalling
settings_right_hotkey_options=Sneltoetse
settings_right_hotkey_custom_options=Persoonlike skakels met die skakel
settings_right_soft_updates_page_options=Tema-opdaterings
settings_global_general_options_title=Algemene standaardinstellings
Expand Down Expand Up @@ -1340,8 +1339,8 @@ theme_xhred_editor_tb_underline=Onderstreep (%cmd+U)
theme_xhred_editor_tb_color=Teks kleur
theme_xhred_editor_tb_background=Teks agtergrond
theme_xhred_editor_tb_align=Belyn
theme_xhred_editor_tb_list_ordered=Genommerde lys
theme_xhred_editor_tb_list_bullet=Kolpuntlys
theme_xhred_editor_tb_list_ordered=Genommerde lys (%cmd+Shift+7)
theme_xhred_editor_tb_list_bullet=Kolpuntlys (%cmd+Shift+8)
theme_xhred_editor_tb_strike=Strek deur
theme_xhred_editor_tb_blockquote=Aanhaling (%cmd+Shift+9)
theme_xhred_editor_tb_link=Voeg skakel in (%cmd+K)
Expand Down Expand Up @@ -1373,3 +1372,5 @@ theme_xhred_columns_layout_remove_button=Stoor en versteek
theme_xhred_columns_layout_variation_cannot_horizontal=Horisontale uitleg kan nie in die mobiele modus gebruik word nie, spesifiek wanneer die skermwydte minder as 992px is

settings_auto_open_panels_on_proximity=Maak geslote panele outomaties oop in die buurt

theme_xhred_config_portable_module_xterm_render_addon=Aktiveer WebGL-weergawe-byvoeging
9 changes: 5 additions & 4 deletions lang/ar.auto
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ settings_right_theme_left_extensions_title=محرر ملحقات السمة
settings_right_theme_left_logo_title=التحكم في شعار السمة
settings_right_theme_configurable_options_title=خيارات قابلة للتكوين لـ Authentic Theme

settings_right_hotkey_options=مفاتيح التشغيل السريع

settings_right_hotkey_custom_options_description=تمكّنك الروابط المخصصة من استخدام الأرقام من <code>1</code> إلى <code>9</code> للوصول السريع إلى أي عنوان URL صالح للوحة <code>.</code> عنوان URL <code></code> يمكن استخراجه من الصفحة المفتوحة حاليا. على سبيل المثال ، للتبديل السريع إلى وحدة Apache ، اضبط الحقل <code>apache</code> على الحقل <code>الرابط المخصص 1</code>. إذا تم تعيين مفتاح التعديل الافتراضي على <code>Alt ،</code> النقر فوق <code>Alt + 1</code> ، سيفتح لك وحدة Apache.
settings_hotkey_custom_1_user=رابط مخصص <code>1</code>
settings_hotkey_custom_2_user=رابط مخصص <code>2</code>
Expand Down Expand Up @@ -1154,6 +1152,7 @@ settings_right_sysinfo_page_options=لوحة القيادة والمراقبة
settings_right_navigation_menu_options=قائمة الإبحار
settings_right_notification_slider_options=المنزلق الجانبي
settings_right_table_options=عرض الجدول
settings_right_hotkey_options=مفاتيح التشغيل السريع
settings_right_hotkey_custom_options=مفاتيح التشغيل السريع للروابط المخصصة
settings_right_soft_updates_page_options=تحديثات الموضوع
settings_global_general_options_title=الافتراضات العامة
Expand Down Expand Up @@ -1340,8 +1339,8 @@ theme_xhred_editor_tb_underline=تسطير (٪ cmd+U)
theme_xhred_editor_tb_color=لون الخط
theme_xhred_editor_tb_background=خلفية النص
theme_xhred_editor_tb_align=محاذاة
theme_xhred_editor_tb_list_ordered=قائمة مرقمة
theme_xhred_editor_tb_list_bullet=قائمة نقطية
theme_xhred_editor_tb_list_ordered=قائمة مرقمة (%cmd+Shift+7)
theme_xhred_editor_tb_list_bullet=قائمة ذات تعداد نقطي (%cmd+Shift+8)
theme_xhred_editor_tb_strike=يتوسطه خط
theme_xhred_editor_tb_blockquote=اقتباس (٪ cmd+Shift+9)
theme_xhred_editor_tb_link=إدراج ارتباط (٪ cmd+K)
Expand Down Expand Up @@ -1373,3 +1372,5 @@ theme_xhred_columns_layout_remove_button=حفظ وإخفاء
theme_xhred_columns_layout_variation_cannot_horizontal=لا يمكن استخدام التخطيط الأفقي في وضع الهاتف المحمول ، خاصة عندما يكون عرض الشاشة أقل من 992 بكسل

settings_auto_open_panels_on_proximity=فتح لوحات مغلقة تلقائيًا على مقربة

theme_xhred_config_portable_module_xterm_render_addon=تمكين ملحق عرض WebGL
9 changes: 5 additions & 4 deletions lang/be.auto
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ settings_right_theme_left_extensions_title=Рэдактар тэмы пашыр
settings_right_theme_left_logo_title=Тэма кіравання лагатыпам
settings_right_theme_configurable_options_title=Параметры, якія можна наладзіць для аўтэнтычнай тэмы

settings_right_hotkey_options=Гарачыя клавішы

settings_right_hotkey_custom_options_description=Карыстальніцкія спасылкі дазваляюць выкарыстоўваць лічбы ад <code>1</code> да <code>9</code> для хуткага доступу да любой дзейнай панэлі <code>URL.</code> <code>URL</code> можна атрымаць з адкрытай у цяперашні час старонкі. Напрыклад, каб хутка пераключыцца на модуль Apache, усталюйце для <code>apache</code> поле <code>Custom link 1</code>. Калі стандартная клавіша-мадыфікатар усталявана на <code>Alt</code>, націск <code>Alt + 1</code> адкрые ваш модуль Apache.
settings_hotkey_custom_1_user=Карыстальніцкая спасылка <code>1</code>
settings_hotkey_custom_2_user=Карыстальніцкая спасылка <code>2</code>
Expand Down Expand Up @@ -1154,6 +1152,7 @@ settings_right_sysinfo_page_options=Прыборная панэль і мані
settings_right_navigation_menu_options=Меню навігацыі
settings_right_notification_slider_options=Бакавы паўзунок
settings_right_table_options=Дысплей табліцы
settings_right_hotkey_options=Гарачыя клавішы
settings_right_hotkey_custom_options=Гарачыя клавішы спецыяльных спасылак
settings_right_soft_updates_page_options=Абнаўленне тэмы
settings_global_general_options_title=Агульныя дэфолты
Expand Down Expand Up @@ -1340,8 +1339,8 @@ theme_xhred_editor_tb_underline=Падкрэсліванне (%cmd+U)
theme_xhred_editor_tb_color=Колер тэксту
theme_xhred_editor_tb_background=Фон тэксту
theme_xhred_editor_tb_align=Выраўнаваць
theme_xhred_editor_tb_list_ordered=Нумараваны спіс
theme_xhred_editor_tb_list_bullet=Маркіраваны спіс
theme_xhred_editor_tb_list_ordered=Нумараваны спіс (%cmd+Shift+7)
theme_xhred_editor_tb_list_bullet=Маркіраваны спіс (%cmd+Shift+8)
theme_xhred_editor_tb_strike=Закрэсліванне
theme_xhred_editor_tb_blockquote=Цытата (%cmd+Shift+9)
theme_xhred_editor_tb_link=Уставіць спасылку (%cmd+K)
Expand Down Expand Up @@ -1373,3 +1372,5 @@ theme_xhred_columns_layout_remove_button=Захаваць і схаваць
theme_xhred_columns_layout_variation_cannot_horizontal=Гарызантальны макет нельга выкарыстоўваць у мабільным рэжыме, у прыватнасці, калі шырыня экрана меншая за 992 пікселя

settings_auto_open_panels_on_proximity=Аўтаматычнае адкрыццё закрытых панэляў на блізкасці

theme_xhred_config_portable_module_xterm_render_addon=Уключыць аддон візуалізацыі WebGL
9 changes: 5 additions & 4 deletions lang/bg.auto
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ settings_right_theme_left_extensions_title=Тема Разширяване ре
settings_right_theme_left_logo_title=Контрол на логото на темата
settings_right_theme_configurable_options_title=Конфигурируеми опции за автентична тема

settings_right_hotkey_options=Бързи клавиши

settings_right_hotkey_custom_options_description=Персонализираните връзки ви позволяват да използвате цифри от <code>1</code> до <code>9</code>, за да получите бърз достъп до всеки валиден панел <code>URL.</code> <code>URL</code> код> могат да бъдат извлечени от текущо отворената страница. Например, за бързо превключване към модул Apache, задайте <code>apache</code> на полето <code>Персонализирана връзка 1</code>. Ако модифициращият ключ по подразбиране е зададен на <code>Alt</code>, щракването върху <code>Alt + 1</code> ще отвори вашия Apache модул.
settings_hotkey_custom_1_user=Персонализирана връзка <code>1</code>
settings_hotkey_custom_2_user=Персонализирана връзка <code>2</code>
Expand Down Expand Up @@ -1154,6 +1152,7 @@ settings_right_sysinfo_page_options=Табло за управление и на
settings_right_navigation_menu_options=Меню за навигация
settings_right_notification_slider_options=Страничен плъзгач
settings_right_table_options=Дисплей на маса
settings_right_hotkey_options=Бързи клавиши
settings_right_hotkey_custom_options=Бързи клавиши за персонализирани връзки
settings_right_soft_updates_page_options=Актуализации на темата
settings_global_general_options_title=Общи настройки по подразбиране
Expand Down Expand Up @@ -1340,8 +1339,8 @@ theme_xhred_editor_tb_underline=Подчертано (%cmd+U)
theme_xhred_editor_tb_color=Цвят на текста
theme_xhred_editor_tb_background=Текстов фон
theme_xhred_editor_tb_align=Подравнете
theme_xhred_editor_tb_list_ordered=Номериран списък
theme_xhred_editor_tb_list_bullet=Списък с водещи символи
theme_xhred_editor_tb_list_ordered=Номериран списък (%cmd+Shift+7)
theme_xhred_editor_tb_list_bullet=Списък с водещи символи (%cmd+Shift+8)
theme_xhred_editor_tb_strike=Зачертано
theme_xhred_editor_tb_blockquote=Цитат (%cmd+Shift+9)
theme_xhred_editor_tb_link=Вмъкване на връзка (%cmd+K)
Expand Down Expand Up @@ -1373,3 +1372,5 @@ theme_xhred_columns_layout_remove_button=Запазване и скриване
theme_xhred_columns_layout_variation_cannot_horizontal=Хоризонталното оформление не може да се използва в мобилен режим, особено когато ширината на екрана е по-малка от 992px

settings_auto_open_panels_on_proximity=Автоматично отваряне на затворени панели при близост

theme_xhred_config_portable_module_xterm_render_addon=Активирайте добавката за изобразяване на WebGL
9 changes: 5 additions & 4 deletions lang/ca.auto
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
settings_right_hotkey_options=Tecles d'accés directe

settings_right_hotkey_custom_options_description=Els enllaços personalitzats us permeten utilitzar els dígits de <code>1</code> a <code>9</code> per accedir ràpidament a qualsevol <code>URL del panell vàlid.</code> L'<code>URL</code> codi> es pot extreure de la pàgina oberta actualment. Per exemple, per canviar ràpidament al mòdul Apache, configureu <code>apache</code> al camp <code>Enllaç personalitzat 1</code>. Si la tecla modificadora predeterminada s'estableix en <code>Alt</code>, fent clic a <code>Alt + 1</code>, s'obrirà el mòdul Apache.

settings_right_reload=Carregueu la pàgina predeterminada al commutador de pestanyes
Expand Down Expand Up @@ -493,6 +491,7 @@ settings_right_sysinfo_page_options=Tauler de control i monitorització en temps
settings_right_navigation_menu_options=Menú de navegació
settings_right_notification_slider_options=Lliscador lateral
settings_right_table_options=Exhibició de taula
settings_right_hotkey_options=Tecles d'accés directe
settings_right_hotkey_custom_options=Tecles d'accés directe d'enllaços personalitzats
settings_right_soft_updates_page_options=Actualitzacions del tema
settings_global_general_options_title=Valors predeterminats generals
Expand Down Expand Up @@ -680,8 +679,8 @@ theme_xhred_editor_tb_underline=Subratllat (%cmd+U)
theme_xhred_editor_tb_color=Color del text
theme_xhred_editor_tb_background=Fons de text
theme_xhred_editor_tb_align=Alinear
theme_xhred_editor_tb_list_ordered=Llista numerada
theme_xhred_editor_tb_list_bullet=Llista amb pics
theme_xhred_editor_tb_list_ordered=Llista numerada (%cmd+Maj+7)
theme_xhred_editor_tb_list_bullet=Llista amb vinyetes (%cmd+Maj+8)
theme_xhred_editor_tb_strike=Tallat
theme_xhred_editor_tb_blockquote=Cita (%cmd+Maj+9)
theme_xhred_editor_tb_link=Insereix l'enllaç (%cmd+K)
Expand Down Expand Up @@ -713,3 +712,5 @@ theme_xhred_columns_layout_remove_button=Desa i amaga
theme_xhred_columns_layout_variation_cannot_horizontal=El disseny horitzontal no es pot utilitzar en el mode mòbil, concretament quan l'amplada de la pantalla és inferior a 992 píxels

settings_auto_open_panels_on_proximity=Panells tancats oberts automàticament a proximitat

theme_xhred_config_portable_module_xterm_render_addon=Activa el complement de representació de WebGL
Loading

0 comments on commit ea3d4eb

Please sign in to comment.