Demo: Diese Website ist eine Demo für fluid – keine offizielle Website von REDAXO. Operated by KLXM Crossmedia

← News

TipTap meets fluid

·

fluid-tiptap-leiste

One editor for everything: fluid now writes text with TipTap – the editor REDAXO 6 also uses in the backend, in YForm and in modules.

So far fluid had its own formatting bar. It was good, but only in fluid. Now the same editor works everywhere: whoever knows it in the backend knows it on the website – and the other way round. Everything TipTap can do, fluid can do as of now.

Right on the page

Write where the text is

One click into a text and TipTap starts right at that spot. The toolbar floats above it – slim on one line, rarely used tools behind “⋯”. Note box, kicker or accent color appear immediately in the real design of the website – the way visitors see them.

  • Schreibmarke genau dort, wo man klickt
  • Formate in der echten Gestaltung des Kits
  • Seiten und Dateien verlinken mit der Auswahl von fluid
fluid-tiptap-leiste
fluid-tiptap-formate

Formats from the kit

Mark up what the kit designs

Which formats exist comes with the kit: paragraph and heading styles, colors, lists and links as buttons – each in its real design. Whatever the kit doesn’t know, the editor drops, also when pasting from Word or another website.

  • Kit „fluid“: Hinweis-Boxen, Dachzeile, große Überschrift, Zweitfarbe, Buttons
  • Wechselt das Kit, wechseln die Formate mit
  • Keine style-Attribute, nur Klassen des Kits

For kit developers

Every kit with its own formats

A kit puts its formats as a short list into its kit.php – class and label, nothing more. It inherits those of its parent kit and adds or removes single ones. That is how the kit “NativeCSS” brings its lists with dots, dashes, dividers and steps, plus its own buttons.

fluid-tiptap-native

Try it out

This text uses the kit’s formats – in the demo, just click into it and change it.

A word in accent color or in the second brand color, a checklist or a link as a button:

  • Formats in the menus “Blockformat” and “Textformat”
  • List format via the list menu
  • Link format in the bar below the link

Tip: switch the kit at the top of the demo – the formats switch too.

fluid on GitHub TipTap on GitHub

Why it makes sense

Six good reasons

  • One editor for everything

    Backend, YForm, modules and website: the same TipTap everywhere. Learn once, write everywhere.

  • Profiles as PHP classes

    fluid’s profile is a class. A project overrides it with its own – versioned in Git, without syncing the database between stage and live.

  • Clean HTML

    Formats are CSS classes, never style attributes – the content security policy stays strict. The editor only knows the kit’s formats, the server cleans every input.

  • Nothing gets lost

    Existing texts stay as they are: paragraph styles, colors, checklists, heading anchors and links to pages.

  • Extensible

    Plugins, formats via #[AsTiptapStyles], own link formats, own page and media picker – fluid uses exactly the interfaces every addon can use.

  • Good for everyone

    What fluid needed now lives in TipTap itself: editing right on the page, shadow DOM, picker on the website. Every REDAXO 6 project benefits.

fluid-tiptap-seitenleiste

In the sidebar

The same editor for longer texts

All fields of an element are in the sidebar – formatted text with TipTap’s full toolbar, including source view and full screen. Pasting Markdown turns into formatting, right-click opens menus for lists and links.

For developers

Formats from kit and addons

A kit puts its formats as a short list into its kit.php. Other addons and the project register their own formats as a class with #[AsTiptapStyles] – like modules with #[AsModule], with a key.

kits/fluid/kit.php PHP
return [
    'label' => 'Fluid (breakpointlos)',
    // Textformate: Klasse => Bezeichnung (optional, sonst die des Eltern-Kits)
    'text' => [
        'paragraphs' => ['t-lead' => 'Hervorgehoben', 't-note' => 'Hinweis-Box'],
        'headings' => ['h-display' => 'Groß (Blickfang)'],      // jede Überschrift
        'colors' => ['c-accent' => 'Akzentfarbe', 'c-secondary' => 'Zweite Markenfarbe'],
        'lists' => ['check' => ['label' => 'Häkchen-Liste', 'list' => 'ul']],
        'links' => ['btn btn--primary' => 'Button'],
    ],
];
src/ShopStyles.php PHP
use Klxm\Tiptap\AsTiptapStyles;
use Klxm\Tiptap\StyleDefinition;

// Formate für vorhandene Profile anmelden – wie #[AsModule], mit Kennung
#[AsTiptapStyles('shop.links', 'Shop', profiles: ['tiptap.fluid', 'tiptap.default'])]
final class ShopStyles extends StyleDefinition
{
    public function styles(): array
    {
        return [
            'linkStyles' => [['label' => 'In den Warenkorb', 'class' => 'shop-cart']],
            'inlineStyles' => [['label' => 'Preis', 'class' => 'shop-price']],
        ];
    }
}

More in fluid’s developer reference, sections “Textformate im Kit” and “Text-Editor (TipTap)”.

Try it

This site is built with REDAXO 6 and fluid.

Sign in, tap “Edit” – and change every text, every image and the whole design right here.