* Mail/RichTextEditor: common preference "small paragraph" now changes return key to a line break instead of a paragraph (with margin)

This commit is contained in:
ralf 2022-09-12 10:04:42 +02:00
parent d2634a74cc
commit bf5389b02e
6 changed files with 21 additions and 16 deletions

View File

@ -219,7 +219,7 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
'&request_id='+this.getInstanceManager().etemplate_exec_id+'&type=htmlarea';
}
// default settings for initialization
let settings = {
let settings : any = {
base_url: egw.webserverUrl + '/vendor/tinymce/tinymce',
target: this.htmlNode[0],
body_id: this.dom_id + '_htmlarea',
@ -266,7 +266,7 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
],
toolbar: et2_htmlarea.TOOLBAR_SIMPLE,
block_formats: "Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;"+
"Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre;Custom Paragraph=customparagraph",
"Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre",
font_formats: "Andale Mono=andale mono,times;Arial=arial,helvetica,"+
"sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book "+
"antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;"+
@ -282,8 +282,15 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
egw.preference('rte_font_size', 'common')+'::'+
egw.preference('rte_font_unit', 'common')),
};
const rte_formatblock = <string>(egw.preference('rte_formatblock', 'common') || 'p');
if (rte_formatblock !== 'p')
let rte_formatblock = <string>(egw.preference('rte_formatblock', 'common') || 'p');
if (rte_formatblock === 'customparagraph')
{
settings.forced_root_block = false;
settings.force_br_newlines = true;
settings.force_p_newlines = false;
rte_formatblock = 'p';
}
else if (rte_formatblock !== 'p')
{
settings.formats[rte_formatblock] = jQuery.extend(true, {}, settings.formats.p);
settings.formats[rte_formatblock].block = rte_formatblock;
@ -298,7 +305,7 @@ export class et2_htmlarea extends et2_editableWidget implements et2_IResizeable
self.resetDirty();
if (self.editor && self.editor.editorContainer)
{
self.editor.formatter.toggle(<string><unknown>egw.preference('rte_formatblock', 'common'));
self.editor.formatter.toggle(rte_formatblock);
jQuery(self.editor.editorContainer).height(self.options.height);
jQuery(self.editor.iframeElement.contentWindow.document).on('dragenter', function(){
if (jQuery('#dragover-tinymce').length < 1) jQuery("<style id='dragover-tinymce'>.dragover:after {height:calc(100% - "+jQuery(this).height()+"px) !important;}</style>").appendTo('head');

View File

@ -435,9 +435,9 @@ class preferences_hooks
'h5' => lang("Heading %1", '5'),
'h6' => lang("Heading %1", '6'),
'pre' => lang("Preformatted"),
'customparagraph' => lang("Custom Paragraph")
'customparagraph' => lang("Small Paragraph")
),
'help' => 'Automatically start with this format block. Custom Paragraph adds less line space between new lines.',
'help' => 'Automatically start with this format block. Small Paragraph adds less line space between new lines.',
'xmlrpc' => True,
'admin' => false,
'default' => 'p'
@ -518,4 +518,4 @@ class preferences_hooks
);
display_section($appname, $file);
}
}
}

View File

@ -15,7 +15,7 @@ audio effect preferences de Audio-Effekt
audio effect enables|disables sound effects used in the theme preferences de Audio Effekte (Sound) für das Thema aktivieren|deaktivieren.
automatically start with this font preferences de Startet automatisch mit dieser Schrift
automatically start with this font size preferences de Startet automatisch mit dieser Schriftgröße
automatically start with this format block. custom paragraph adds less line space between new lines. preferences de Startet automatisch mit dieser Formatierung.<br/> <b>Absatz schmal</b> erzeugt einen geringeren Zeilenabstand.
automatically start with this format block. custom paragraph adds less line space between new lines. preferences de Startet automatisch mit dieser Formatierung.<br/> <b>Schmaler Absatz</b> erzeugt einen geringeren Zeilenabstand.
br preferences de br
change a user password by passing the old and new passwords. returns true on success, false on failure. preferences de Ändern Sie Ihr Passwort, indem Sie Ihr altes und neues Passwort angeben. Es wird TRUE zurückgegeben für eine erfolgreiche Änderung und FALSE wenn es nicht erfolgreich war.
change password preferences de Passwort ändern
@ -31,7 +31,7 @@ color preferences de Farbe
country preferences de Land
current password preferences de Aktuelles Passwort
custom login box color, defaults to above color darkened preferences de Benutzerdefinierte Farbe der Anmeldemaske, Vorgabe obige Farbe abgedunkelt
custom paragraph preferences de Absatz schmal
small paragraph preferences de Schmaler Absatz
custom sidebar menu active color, defaults to above color darkened preferences de Benutzerdefinierte Farbe des Seitenmenü, Vorgabe obige Farbe abgedunkelt
dark mode theme preferences de Dark Mode Thema
dark moono theme preferences de Dunkles Moono Schema

View File

@ -15,7 +15,7 @@ audio effect preferences en Audio effect
audio effect enables|disables sound effects used in the theme preferences en Audio effect enables|disables sound effects used in the theme
automatically start with this font preferences en Automatically start with this font
automatically start with this font size preferences en Automatically start with this font size
automatically start with this format block. custom paragraph adds less line space between new lines. preferences en Automatically start with this format block.<br/><b>Custom Paragraph</b> adds less line space between new lines.
automatically start with this format block. small paragraph adds less line space between new lines. preferences en Automatically start with this format block.<br/><b>Small Paragraph</b> adds less line space between new lines.
br preferences en br
change a user password by passing the old and new passwords. returns true on success, false on failure. preferences en Change a user password by passing the old and new passwords. Returns TRUE on success, FALSE on failure.
change password preferences en Change password
@ -31,7 +31,7 @@ color preferences en Color
country preferences en Country
current password preferences en Current password
custom login box color, defaults to above color darkened preferences en Custom login box color, defaults to above color darkened
custom paragraph preferences en Custom Paragraph
small paragraph preferences en Small Paragraph
custom sidebar menu active color, defaults to above color darkened preferences en Custom sidebar menu active color, defaults to above color darkened
dark mode theme preferences en Dark mode theme
dark moono theme preferences en Dark Moono Theme

View File

@ -15,7 +15,7 @@ audio effect preferences fr Effet audio
audio effect enables|disables sound effects used in the theme preferences fr Effets Audio : active|désactive les effets sonores utilisés dans le thème
automatically start with this font preferences fr Démarrer automatiquement avec cette police
automatically start with this font size preferences fr Démarrer automatiquement avec cette taille de police
automatically start with this format block. custom paragraph adds less line space between new lines. preferences fr Démarrer automatiquement avec ce format de bloc.<br/><b>Paragraphe personnalisé</b> ajoute moins d'espace entre les nouvelles lignes.
automatically start with this format block. custom paragraph adds less line space between new lines. preferences fr Démarrer automatiquement avec ce format de bloc.<br/><b>Petit Paragraphe</b> ajoute moins d'espace entre les nouvelles lignes.
br preferences fr br
change a user password by passing the old and new passwords. returns true on success, false on failure. preferences fr Change un mot de passe en fournissant l'ancien et le nouveau mot de passe. Retourne TRUE en cas de réussite, FALSE en cas d'échec.
change password preferences fr Changer votre mot de passe
@ -31,7 +31,7 @@ color preferences fr Couleur
country preferences fr Pays
current password preferences fr Mot de passe actuel
custom login box color, defaults to above color darkened preferences fr Couleur de la boîte de connexion personnalisée, par défaut, plus sombre
custom paragraph preferences fr Paragraphe personnalisé
small paragraph preferences fr Paragraphe petit
custom sidebar menu active color, defaults to above color darkened preferences fr Couleur de la sélection active sur le menu latéral, par défaut, plus sombre
dark moono theme preferences fr Thème Dark Moono
data exchange settings preferences fr Paramètres d'échange de données

View File

@ -15,7 +15,6 @@ audio effect preferences sk Zvukový efekt
audio effect enables|disables sound effects used in the theme preferences sk Zvukový efekt - zapne/vypne zvukvé efekty použité v tejto téme
automatically start with this font preferences sk Automaticky začať s týmto písmom
automatically start with this font size preferences sk Automaticky začať s touto veľkosťou písma
automatically start with this format block.<br/><b>custom paragraph</b> adds less line space between new lines. preferences sk Automaticky začať týmto formátovacím blokom.<br/><b>Vlastný odstavec</b> pridáva menej odsadenia medzi novými riadkami.
change a user password by passing the old and new passwords. returns true on success, false on failure. preferences sk Zmeniť používateľské heslo zadaním starého a nového hesla. Vráti TRUE v prípade úspechu a FALSE v prípade neúspechu.
change password preferences sk Zmeniť heslo
change your password preferences sk Zmeniť heslo
@ -30,7 +29,6 @@ color preferences sk Farba
country preferences sk Krajina
current password preferences sk Súčasné heslo
custom login box color, defaults to above color darkened preferences sk Vlastná farba pre prihlasovacie okno, predvolený je tmavší odtieň vyššieuvedenej farby
custom paragraph preferences sk Vlastný odstavec
custom sidebar menu active color, defaults to above color darkened preferences sk Vlastná farba pre bočný panel, predvolený je tmavší odtieň vyššieuvedenej farby
dark moono theme preferences sk Tmavá Moono téma
data exchange settings preferences sk Nastavenia pre výmenu údajov