UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

47 lines (45 loc) 911 B
import { Mark, mergeAttributes } from "../../../chunks/chunk-MDIOFKJQ.js"; import "../../../chunks/chunk-U5RRZUYZ.js"; // src/input/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 };