Skip to content

Instantly share code, notes, and snippets.

View tranduongms1's full-sized avatar

Tran Duong tranduongms1

View GitHub Profile
@tranduongms1
tranduongms1 / quill-figure-with-caption.js
Last active December 12, 2023 14:04
Quill figure with caption, base on BlockEmbed
import Quill from 'quill';
const Module = Quill.import('core/module');
const BlockEmbed = Quill.import('blots/block/embed');
class ImageBlot extends BlockEmbed {
static blotName = 'image';
static tagName = ['figure', 'image'];
static create(value) {