Skip to content

Editor: a React-free entry for the TipTap extensions, and custom block types in BlockEditor #62

Open

Description

@n4ff4h

javaabu/block-editor (Javaabu/block-editor#2) reuses Onu's TipTap pieces from @javaabu/onu/editor: ThaanaKeyboard, AutoDirection, CalloutNode and Embed, plus attachThaanaKeyboard from @javaabu/onu/thaana. Its editor UI is framework-free, so Blade apps can use it without React.

Two things would make that cleaner. Neither blocks block-editor; it works today.

  1. A React-free entry for the TipTap extensions. @javaabu/onu/editor re-exports the React editors, so a Vite build that only uses ThaanaKeyboard still has to resolve react, @tiptap/react, @tiptap/static-renderer, radix-ui and the rest. They tree-shake out of the bundle, but Blade-only apps must install them. Something like @javaabu/onu/editor/extensions (ThaanaKeyboard, AutoDirection, CalloutNode, Embed, createSchemaExtensions, toEmbedUrl, isSafeUrl) and a React-free @javaabu/onu/thaana/core (keymaps, transliterate, attachThaanaKeyboard) would fix that.
  2. Custom block types in BlockEditor's / and + menus (a blocks prop of BlockType[] rather than the closed BlockTypeId union). With that, a React-only app could use Onu's BlockEditor for simple custom blocks. block-editor keeps its own shell either way, because its blocks come from PHP config with settings panels.

detectDirection / resolveBlockDirection would also be handy exports. block-editor has its own copy, so its PHP renderer and React renderer agree.

Activity

  1. n4ff4h commented on Nov 6, 2026

    @n4ff4h
    CollaboratorAuthor

    Now that manifest has npm scopes (Javaabu/manifest#17), this matters for more than bundle size. The javaabu/block-editor Blade entry imports ThaanaKeyboard, AutoDirection, CalloutNode and Embed from @javaabu/onu/editor. Because that module also imports react, @tiptap/react and @tiptap/static-renderer, block-editor has to keep React in its assets scope, and manifest:check asks Blade-only apps to install it. A React-free entry, e.g. @javaabu/onu/editor/extensions, would let block-editor move React to for: 'pages'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions