Fehler: Contao 4.13 / TinyMCE / Theme Styles

Mechtild Bender-Rinsche's Avatar

Mechtild Bender-Rinsche

10 Oct, 2022 11:39 AM

Produkt: Tao Contao
Contao-Version: 4.13
Browser und Browserversionen: Chrome

Hallo,

nach dem Update auf Contao 4.13 würden meine Textfelder nicht mehr angezeigt. Grund dafür war meine angepasste "be_tinyMCE.html5". Diese habe ich jetzt gelöscht und die Felder werden nun wieder angezeigt.

Allerdings habe ich dadurch auch keine "Theme Styles" mehr im "TinyMCE" zu Verfügung.

Wie bekomme ich die "Theme Styles" wieder in den "TinyMCE" eingebaut?

Der alte Code sah so aus:

style_formats: [
    {title: 'Theme Styles', items: [
      { title: 'Information - BLAU', block: 'p', classes: 'information', exact : true},
      { title: 'Confirmation - GRÜN', block: 'p', classes: 'confirmation', exact : true},
      { title: 'Warning - ROT', block: 'p', classes: 'warning', exact : true},
      { title: 'FORMATIERUNG ENTFERNEN', block: 'p', remove : 'all', exact : true}
   ]}
  1. Support Staff 1 Posted by RockSolid Theme... on 10 Oct, 2022 03:53 PM

    RockSolid Themes's Avatar

    Vielen Dank für Ihre Frage.

    Diese Anpassung sollte nach wie vor funktionieren. Bitte senden Sie uns Ihre be_tinyMCE.html5-Datei zu damit wir den Fehler genauer untersuchen können.

  2. 2 Posted by Mechtild Bender... on 10 Oct, 2022 04:15 PM

    Mechtild Bender-Rinsche's Avatar

    Hier die be_tinyMCE.html5-Datei.

  3. Support Staff 3 Posted by RockSolid Theme... on 11 Oct, 2022 10:30 AM

    RockSolid Themes's Avatar

    Bitte ersetzen Sie den Inhalt des be_tinyMCE-Templates mit folgendem Code:

    <?php $this->extend('be_tinyMCE') ?>
    
    <?php $this->block('custom') ?>
      style_formats_merge: true,
      style_formats: [
        {title: 'Theme Styles Spielecircus', items: [
          { title: 'Information - BLAU', block: 'p', classes: 'information', exact : true},
          { title: 'Confirmation - GRÜN', block: 'p', classes: 'confirmation', exact : true},
          { title: 'Warning - ROT', block: 'p', classes: 'warning', exact : true},
          { title: 'FORMATIERUNG ENTFERNEN', block: 'p', remove : 'all', exact : true}
        ]}
      ],
    <?php $this->endblock() ?>
    

    Dadurch wird die tinyMCE-Konfiguration erweitert und die Anpassungen bleiben update-sicher.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac