Für TinyMCE 4 kann man die Einstellungen unter Administration / System /WYSIWYG bearbeiten.
Das Feld für zusätzliche Parameter ist hierbei für eigene Einstellungen (wie z.B. die Format-Auswahl) hilfreich.
Da müsste dann z.B. in dem Bereich für CMS_HTML folgendes eingetragen werden:
Code: Alles auswählen
{
"style_formats": [
{
"title": "Bold text",
"inline": "b"
},
{
"title": "Red text",
"inline": "span",
"styles": {
"color": "#ff0000"
}
},
{
"title": "Red header",
"block": "h1",
"styles": {
"color": "#ff0000"
}
},
{
"title": "Example 1",
"inline": "span",
"classes": "example1"
},
{
"title": "Example 2",
"inline": "span",
"classes": "example2"
},
{
"title": "Table styles"
},
{
"title": "Table row 1",
"selector": "tr",
"classes": "tablerow1"
}
],
"formats": {
"alignleft": {
"selector": "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",
"classes": "left"
},
"aligncenter": {
"selector": "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",
"classes": "center"
},
"alignright": {
"selector": "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",
"classes": "right"
},
"alignfull": {
"selector": "p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",
"classes": "full"
},
"bold": {
"inline": "span",
"classes": "bold"
},
"italic": {
"inline": "span",
"classes": "italic"
},
"underline": {
"inline": "span",
"classes": "underline",
"exact": true
},
"strikethrough": {
"inline": "del"
},
"customformat": {
"inline": "span",
"styles": {
"color": "#00ff00",
"fontSize": "20px"
},
"attributes": {
"title": "My custom format"
}
}
}
}
So würde dann z.B. im Format-Menü im Punkt Formate dann die definierten Formate auftauchen.
Die Einstellungen landen in der Datei config.wysiwyg_tinymce4.php in config-Ordner zur jeweiligen Umgebung.