Support » Allgemeine Fragen » Tinymce doesn't use my theme's css styleheet

  • i’ve added these lines to my functions.php:

    // Connect the WordPress post editor to your custom stylesheet
    function my_theme_add_editor_styles() {
      add_editor_style( 'editor-style.css' );

    Than i got the message in Design > Editor:

    WordPress Wiki Theme: Stylesheet für WYSIWYG-Editor (editor-style.css)

    where i added this link to my current themes css document which is in the same directory like the editor-style.css

    @import url( ’style_blue.css‘ );

    /* Add overwrites as needed so that the content of the editor field is attractive and not broken */
    body { padding: 0; background: #fff; }

    But i get still only the wp-content.css.

    What am i doing wrong?

Ansicht von 1 Antwort (von insgesamt 1)
  • Hi. This is the German support forum, so please feel free to ask here in German – or switch to the international section at https://wordpress.org/support/.

    Hallo. Du bist hier im deutschen Support-Forum. Du kannst deine Frage gerne hier auf Deutsch stellen – oder du versuchst es im internationalen Bereich unter https://wordpress.org/support/.

    Wenn du in der functions.php folgendes einfügst

    add_editor_style();

    wird automatisch ein Stylesheet editor-style.css aus dem Theme-Ordner geladen.

    Möchtest du das Stylesheet zur besseren Übersichtlichkeit in ein Unterverzeichnis packen und ggf. auch anders benennen, kannst du dies gesondert angeben:

    add_editor_style( 'css/mein-eigenes-editor-style.css' );

    Um andere Style-Regeln für die Darstellung im Front-End einzubinden, empfehle ich gerne das Plugin Simple Custom CSS, bei dem du die Zeile body { padding: 0; background: #fff; } direkt einfügen kannst. Alternativ kannst du auch ein eigenes Stylesheet mit Hilfe von wp_enqueue_style() einbinden. Mehr Infos dazu: https://codex.wordpress.org/wp_enqueue_style

Ansicht von 1 Antwort (von insgesamt 1)
  • Das Thema „Tinymce doesn't use my theme's css styleheet“ ist für neue Antworten geschlossen.