WordPress Tiny MC Editor mit eigenen CSS-Klassen erweitern


/ Published in: PHP
Save to your folder(s)

Für functions.php


Copy this code and paste it in your HTML
  1. // in functions.php einfuegen
  2.  
  3. function my_mce_buttons_2($buttons) { array_unshift($buttons, 'styleselect'); return $buttons; } add_filter('mce_buttons_2', 'my_mce_buttons_2');
  4.  
  5. function my_mce_before_init($init_array)
  6. {
  7. // weitere Klassen mit einem ; trennen
  8. $init_array['theme_advanced_styles'] = "KlasseName=meine-klasse;KlasseZwei=meine-klasse-zwei";
  9. return $init_array;
  10. }
  11. add_filter('tiny_mce_before_init', 'my_mce_before_init');

URL: http://www.scriptease.de/wordpress-eigene-css-styles-im-mce-editor-hinzufuegen/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.