Tinymce amélioration init.js
This commit is contained in:
parent
ee85e47c3b
commit
e341bc3282
|
@ -13,7 +13,7 @@ if ( typeof(privateKey) == 'undefined') {
|
||||||
if ( typeof(lang_admin) == 'undefined') {
|
if ( typeof(lang_admin) == 'undefined') {
|
||||||
var lang_admin = "fr_FR";
|
var lang_admin = "fr_FR";
|
||||||
};
|
};
|
||||||
// Adaptation pour Snipcart
|
// Initialisations et adaptations pour Snipcart
|
||||||
if ( typeof(initSnipcart) == 'undefined') {
|
if ( typeof(initSnipcart) == 'undefined') {
|
||||||
var initSnipcart = false;
|
var initSnipcart = false;
|
||||||
};
|
};
|
||||||
|
@ -86,6 +86,35 @@ var templatesList = [
|
||||||
description: "Grille adaptative sur 12 colonnes, sur mobile elles passent les unes en dessous des autres."
|
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"}
|
||||||
|
]}
|
||||||
|
];
|
||||||
|
|
||||||
if( initSnipcart == true ) {
|
if( initSnipcart == true ) {
|
||||||
var templatesSnipcart = [
|
var templatesSnipcart = [
|
||||||
|
@ -223,35 +252,7 @@ tinymce.init({
|
||||||
// Contenu du bouton insérer
|
// Contenu du bouton insérer
|
||||||
insert_button_items: "anchor hr table",
|
insert_button_items: "anchor hr table",
|
||||||
// Contenu du bouton formats
|
// Contenu du bouton formats
|
||||||
style_formats: [
|
style_formats: 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"}
|
|
||||||
]}
|
|
||||||
],
|
|
||||||
// Templates
|
// Templates
|
||||||
templates: templatesList
|
templates: templatesList
|
||||||
});
|
});
|
||||||
|
@ -354,35 +355,7 @@ tinymce.init({
|
||||||
// Url de base
|
// Url de base
|
||||||
document_base_url: baseUrl,
|
document_base_url: baseUrl,
|
||||||
// Contenu du bouton formats
|
// Contenu du bouton formats
|
||||||
style_formats: [
|
style_formats: 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"}
|
|
||||||
]}
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue