Skip to content

Ridu v0.18.0

Choose a tag to compare

@github-actions github-actions released this 08 Oct 10:00

Ridu 0.18.0

Rich text gains plain-text and Markdown converters, the editor works as a form field, and two
editor bugs from 0.17.0 are fixed.

Changes

  • Typing a list with * or +, a checklist with * [ ], a tab in a code block, a line break
    written as two trailing spaces or a backslash, or a code fence of four backticks made a document
    the editor couldn't save: the admin couldn't save the entry, and in an application the bound
    value kept the previous document. The editor now saves them. Lexical 0.49 records the Markdown it
    read on each node, which the stored document doesn't accept, so the editor now leaves it out.
  • In an application, CSS outside a cascade layer, such as a reset like UnoCSS's preflight, no longer
    restyles RichTextEditor or its menus and dialogs: lists keep their bullets, headings their
    sizes and buttons their colors, and focus draws one outline.
  • convertLexicalToPlaintext from @riducms/sdk/richtext returns a document's text, for previews,
    search, notifications or a language model. Custom blocks, uploads and relationships take
    converters, as with renderRichTextHTML.
  • @riducms/plugin-richtext/markdown exports convertMarkdownToLexical, which turns Markdown, such
    as a language model's answer, into the document the editor's Markdown shortcuts make. It runs on
    a server without a browser. Pass the Go field's features; Markdown for anything else stays
    text.
  • RichTextEditor with a name submits its document with a form, as JSON in a hidden field,
    including without JavaScript.
  • The editor guide shows saving with a form action,
    converting Markdown, and restyling the editor through Ridu's app layer. The
    display guide shows plain text.

Breaking changes and upgrade

Update the Go module and all Ridu npm packages to 0.18.0 together, regenerate application contracts,
and rebuild the admin and application binary. This release changes no Go APIs, authoring config,
manifest or protocol versions, REST behavior, migration planners, or database layouts, so existing
databases and migration histories need no changes.

  • In an application, CSS outside a cascade layer no longer restyles the editor's inner elements or
    its popups unless its selector is more specific than two classes. Move such overrides into Ridu's
    app layer, and declare Ridu's layers after a framework's own, such as Tailwind's:
    @layer ridu, ridu-plugins, app;. Custom properties and a class passed to the editor work as
    before.
  • RichTextEditor's name now also adds a form field. Remove a hidden input you added with the
    same name.
  • @riducms/plugin-richtext adds @lexical/code-core and @lexical/extension 0.49.0 as
    dependencies.

This is a pre-1 release with breaking contracts; keep the coordinated packages aligned. Production
still runs as a Go binary with its static admin embedded, without a JavaScript server.