classes in Tiny4

Ein CMSimple Support Forum für deutsch sprechende Nutzer und Entwickler
Post Reply
albert
Posts: 526
Joined: Sun Mar 07, 2010 8:01 pm
Location: Germany
Contact:

classes in Tiny4

Post by albert » Fri Mar 09, 2018 8:07 pm

ich fand auf http://pluginxh.iseye.eu/?Plugins/Lightbox
eine nette Anleitung, Links classes zuzuordnen
TIPP:
Damit ihr im tinymce4 auch die class auf den Link auswählen könnt, solltet Ihr, in der init Euren tinymce4, folgende Zeile unter plugins: oder external_plugins: hinzufügen:
style_formats: [{title: 'Special Classes',items: [{title: 'Lighbox', selector: 'a', 'classes': 'zoombox'}]}],
Dann könnt Ihr das ganz schnell auswählen.
Alternativ könnte man auch
link_class_list: [
{title: "Keine", value: ""},
{title: "fancybox", value: "zoom"},
{title: "fancybox-g", value: "zoom_g"},
{title: "fancybox-i", value: "zoom_i"},
{title: "Lightbox", value: "zoombox"}
]
am Ende in der init einfügen. Dann habt ihr im tinymce4 die class - Auswahl direkt im Link
Nur leider verstehe ich nicht, wie genau das gehen soll... (welche init?), wobei ich die zweite Lösung vorziehen würde - ich hätte noch ein paar weitere classes, die ich gern eintragen würde!
Wer weiß Rat :?:

Ach ja, da wir schon mal dabei sind:
gibt es auch was ähnliches bei Bildern? Im "Bild einfügen/bearbeiten" unter Erweitert gibt es ja "Stil". Nur eben kein Auswahlfeld

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: classes in Tiny4

Post by cmb » Fri Mar 09, 2018 10:13 pm

albert wrote:
Fri Mar 09, 2018 8:07 pm
Nur leider verstehe ich nicht, wie genau das gehen soll... (welche init?), […]
Vielleicht hilft die allgemeine Erklärung im Wiki weiter?
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: classes in Tiny4

Post by Tata » Fri Mar 09, 2018 11:12 pm

See all possible init_*.js in tinymce4/inits and edit either all (except of sidebar, minimal, imagetools) or only these, you need to have prepared.
Here are the "last" lines of my init_*.js files:

Code: Select all

...
entity_encoding: "raw",
  extended_valid_elements: "span[*],script",
  //used for hi_fancybox
  link_class_list: [
    {title: "class", value: ""},
    {title: "fancybox", value: "zoom"},
    {title: "fancybox-g", value: "zoom_g"},
    {title: "fancybox-i", value: "zoom_i"}
  ],
  //used for image styling
  image_class_list: [
    {title: "---", value: ""},
    {title: 'framed', value: 'framed'},
    {title: "left", value: "left"},
    {title: "right", value: "right"}
  ]  
 } 
It is simple to extend the lists of classes here.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

albert
Posts: 526
Joined: Sun Mar 07, 2010 8:01 pm
Location: Germany
Contact:

Re: classes in Tiny4

Post by albert » Sat Mar 10, 2018 8:09 pm

wow, now i understood, thanks a lot

Post Reply