A lightweight inline tool for Editor.js (v2.x) that lets you add custom text formatting tags like `<strong>`, `<em>`, `<u>`, or any HTML inline element without writing a full inline tool plugin. Version 0.1.0 provides a factory function `createGenericInlineTool` and three pre-built tools (ItalicInlineTool, UnderlineInlineTool, StrongInlineTool). Configure tag name, sanitize rules, keyboard shortcut, and toolbar icon. Ideal for extending Editor.js with custom inline formatting or replacing default bold/italic with different tags. Ships TypeScript types. Limited adoption; low release cadence.
npm install editorjs-inline-formatterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to initialize EditorJS with a custom bold tool using createGenericInlineTool and a pre-defined italic tool.
Always provide a sanitize object with allowed attributes for the tag, e.g., { a: { href: true } }.In the tool config, set inlineToolbar: true or add the tool name to the inlineToolbar array of a block tool.
Embed full SVG markup inline or use an icon library component.
Use createGenericInlineTool with a unique tagName or avoid mixing pre-built and custom tools for the same purpose.
Use `import createGenericInlineTool from 'editorjs-inline-formatter'` instead of `import { createGenericInlineTool } from 'editorjs-inline-formatter'`.Ensure the config object includes `tagName: 'YOUR_TAG'`.
Set the tool config as `italic: ItalicInlineTool` not `italic: { class: ItalicInlineTool }` (unless you need additional options).