Registry / productivity / quill-blot-formatter

quill-blot-formatter

JSON →
library1.0.5jsnpmunverified

A module for the Quill text editor (v1.x) that provides resizing, alignment, and deletion of embedded blots like images and iframe videos. Version 1.0.5 is the latest stable release. It supports custom BlotSpec and Action classes for extensibility, ships TypeScript definitions, and has no active maintenance. Compared to alternatives like quill-image-resize-module, it supports multiple blot types and actions out of the box.

npm install quill-blot-formatter
INSTALL
IMPORT
SIG · QUILL-BLOT-FORMATT
Q
quill-blot-formatter
productivityjavascriptv1.0.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BlotFormatter
import BlotFormatter from 'quill-blot-formatter';
const BlotFormatter = require('quill-blot-formatter');
Default export; also available as named export. For CommonJS use require('quill-blot-formatter').default.
default
import BlotFormatter from 'quill-blot-formatter/dist/BlotFormatter';
import { BlotFormatter } from 'quill-blot-formatter/dist/BlotFormatter';
The dist file exports default, not named. Same for global QuillBlotFormatter.default.
QuillBlotFormatter (global)
Quill.register('modules/blotFormatter', QuillBlotFormatter.default);
Quill.register('modules/blotFormatter', QuillBlotFormatter);
When using script tag, the global exposes modules under QuillBlotFormatter; register default export.

Shows how to register the blotFormatter module with Quill and create an editor instance. Includes inserting an image to enable resizing/alignment.

import Quill from 'quill'; import BlotFormatter from 'quill-blot-formatter'; Quill.register('modules/blotFormatter', BlotFormatter); const quill = new Quill('#editor', { modules: { toolbar: true, blotFormatter: {} } }); // Insert an image to test quill.insertEmbed(0, 'image', 'https://via.placeholder.com/300');
Debug
Known issues
gotchaBlotFormatter must be registered as a Quill module before creating the editor instance.
fix
Call Quill.register('modules/blotFormatter', BlotFormatter) before new Quill().
affects: >=0.0.0
gotchaThe package is not actively maintained; may not work with Quill v2 or newer versions.
fix
Consider using quill-image-resize-module or a fork for Quill v2 compatibility.
affects: <1.0.6
deprecatedUsing CommonJS require without .default may fail in bundlers that expect ESM.
fix
Use import BlotFormatter from 'quill-blot-formatter' or const BlotFormatter = require('quill-blot-formatter').default;.
affects: >=1.0.0
Errors
Common errors & fixes
Uncaught TypeError: Cannot read property 'blotFormatter' of undefined
BlotFormatter module not registered before constructing Quill instance.
fix
Ensure Quill.register('modules/blotFormatter', BlotFormatter) is called before new Quill().
QuillBlotFormatter is not defined
Using script tag but missing the library script or wrong global name.
fix
Add <script src="path/to/quill-blot-formatter.min.js"></script> and use QuillBlotFormatter.default.
Module not found: Can't resolve 'quill-blot-formatter'
Package not installed or import path incorrect.
fix
Run npm install quill-blot-formatter or yarn add quill-blot-formatter. For direct dist import use 'quill-blot-formatter/dist/BlotFormatter'.
Upgrade
Version history
1.0.5latest on npm
Audit
Dependencies
quillrequiredpeer dependency; requires Quill v1.3.4 or compatible
Agent activity
26 hits · last 30 days
node
24
Amazon
1
OpenAI (training)
1
Resources
quill-blot-formatter — npm install quill-blot-formatter · libregistry