bloc formats + lexiques

This commit is contained in:
Deltacms 2024-02-16 09:14:31 +01:00
parent d1d068e364
commit d4287e5226
3 changed files with 17 additions and 33 deletions

View File

@ -14,6 +14,16 @@ if ( typeof(lang_admin) == 'undefined') {
var lang_admin = "fr_FR";
};
var blockFormats ='Paragraph=p; Header 1=h1; Header 2=h2; Header 3=h3; Header 4=h4;';
switch (lang_admin) {
case 'fr_FR':
blockFormats ='Paragraphe=p; Titre 1=h1; Titre 2=h2; Titre 3=h3; Titre 4=h4;';
break;
case 'es':
blockFormats ='Párrafo=p; Cabecera 1=h1; Cabecera 2=h2; Cabecera 3=h3; Cabecera 4=h4;';
break;
}
// Pour la cass dans le body de l'iframe
if ( typeof(bodyIframe) == 'undefined') {
var bodyIframe = "editorWysiwyg";
@ -113,35 +123,6 @@ var templatesList = [
description: "Grille adaptative sur 12 colonnes, sur mobile elles passent les unes en dessous des autres."
}
];
var formatsList = [
{title: "Headers", items: [
{title: "Header 1", format: "h1"},
{title: "Header 2", format: "h2"},
{title: "Header 3", format: "h3"},
{title: "Header 4", format: "h4"}
]},
{title: "Inline", items: [
{title: "Bold", icon: "bold", format: "bold"},
{title: "Italic", icon: "italic", format: "italic"},
{title: "Underline", icon: "underline", format: "underline"},
{title: "Strikethrough", icon: "strikethrough", format: "strikethrough"},
{title: "Superscript", icon: "superscript", format: "superscript"},
{title: "Subscript", icon: "subscript", format: "subscript"},
{title: "Code", icon: "code", format: "code"}
]},
{title: "Blocks", items: [
{title: "Paragraph", format: "p"},
{title: "Blockquote", format: "blockquote"},
{title: "Div", format: "div"},
{title: "Pre", format: "pre"}
]},
{title: "Alignment", items: [
{title: "Left", icon: "alignleft", format: "alignleft"},
{title: "Center", icon: "aligncenter", format: "aligncenter"},
{title: "Right", icon: "alignright", format: "alignright"},
{title: "Justify", icon: "alignjustify", format: "alignjustify"}
]}
];
var offsetToolbar = 45;
if( document.documentElement.clientWidth < 800 ) offsetToolbar = 80;
@ -166,6 +147,7 @@ tinymce.init({
toolbar_sticky_offset: offsetToolbar,
// Langue
language: lang_admin,
// Plugins
plugins: pluginsList,
// Contenu de la barre d'outils
@ -276,7 +258,7 @@ tinymce.init({
// Contenu du bouton insérer
insert_button_items: "anchor hr table",
// Contenu du bouton formats
style_formats: formatsList,
block_formats: blockFormats,
// Templates
templates: templatesList
});
@ -386,7 +368,8 @@ tinymce.init({
// Url de base
document_base_url: baseUrl,
// Contenu du bouton formats
style_formats: formatsList
block_formats: blockFormats,
//style_formats: formatsList
});

View File

@ -261,5 +261,6 @@ tinymce.addI18n('es',{
"Table": "Tabla",
"Tools": "Herramientas",
"Powered by {0}": "Desarrollado por {0}",
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u00c1rea de texto enriquecido. Pulse ALT-F9 para el menu. Pulse ALT-F10 para la barra de herramientas. Pulse ALT-0 para ayuda"
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "\u00c1rea de texto enriquecido. Pulse ALT-F9 para el menu. Pulse ALT-F10 para la barra de herramientas. Pulse ALT-0 para ayuda",
"Open link in...": "Abrir enlace en..."
});

View File

@ -259,5 +259,5 @@ tinymce.addI18n('fr_FR',{
"Tools": "Outils",
"Powered by {0}": "Propuls\u00e9 par {0}",
"Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help": "Zone Texte Riche. Appuyer sur ALT-F9 pour le menu. Appuyer sur ALT-F10 pour la barre d'outils. Appuyer sur ALT-0 pour de l'aide.",
"Open link...": "Cible"
"Open link in...": "Ouvrir le lien dans..."
});