UNPKG

alinea

Version:
47 lines (45 loc) 911 B
import { Mark, mergeAttributes } from "../../../chunks/chunk-FKWEJTSK.js"; import "../../../chunks/chunk-NZLE2WMY.js"; // src/field/richtext/extensions/Small.ts var Small = Mark.create({ name: "small", addOptions() { return { HTMLAttributes: {} }; }, parseHTML() { return [ { tag: "small" } ]; }, renderHTML({ HTMLAttributes }) { return [ "small", mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0 ]; }, addCommands() { return { setSmall: () => ({ commands }) => { return commands.setMark(this.name); }, toggleSmall: () => ({ commands }) => { return commands.toggleMark(this.name); }, unsetSmall: () => ({ commands }) => { return commands.unsetMark(this.name); } }; } }); var Small_default = Small; export { Small_default as default };