Ritext

What's New

The latest extensions and updates in Ritext.

Three new extensions join Ritext in this release, along with an upgrade to the latest Tiptap 3.

YouTube

Click the YouTube button in the toolbar, paste a link, and choose the width, height, alignment, controls, autoplay and loop. Select a video and open the dropdown again to edit it.

import { Youtube } from 'ritext/extension/youtube';

const extensions = [
  Youtube.configure({
    nocookie: true,
    modestBranding: true,
  }),
];

If the Text Align extension is installed, its toolbar button aligns a selected video too.

Details

The Details button wraps the current block in a collapsible section. Click it again inside a section to remove it. Saved HTML uses the native <details> element, so it opens and closes in the Renderer without JavaScript.

import { Details } from 'ritext/extension/details';

const extensions = [
  Details.configure({ persist: true }),
];

Character Count

CharacterCount is headless: it adds nothing to the toolbar. Read the counts with useCharacterCount, or drop in CharacterCountUI anywhere inside <Editor>.

import { CharacterCount, CharacterCountUI } from 'ritext/extension/charactercount';

const extensions = [CharacterCount.configure({ limit: 280 })];

<Editor extensions={extensions}>
  <Toolbar />
  <Content />
  <CharacterCountUI color="#2563eb" />
</Editor>

Other changes

  • Tiptap packages upgraded to 3.31.4.
  • motion, react-easy-crop, @floating-ui/react, tailwind-merge and yjs updated to their latest versions.

No changes to existing APIs. Add the new extensions to your extensions array to start using them.

On this page