rhino-editor
Version:
A custom element wrapped rich text editor
36 lines (34 loc) • 732 B
JavaScript
// src/exports/extensions/figcaption.ts
import { Node, mergeAttributes } from "@tiptap/core";
var Figcaption = Node.create({
name: "attachment-figcaption",
group: "block figcaption",
content: "inline*",
selectable: false,
draggable: false,
defining: true,
isolating: true,
addOptions() {
return {
HTMLAttributes: { class: "attachment__caption attachment--edited" }
};
},
parseHTML() {
return [
{
tag: `figure.attachment figcaption`
}
];
},
renderHTML({ HTMLAttributes }) {
return [
"figcaption",
mergeAttributes(this.options.HTMLAttributes, HTMLAttributes),
0
];
}
});
export {
Figcaption
};
//# sourceMappingURL=chunk-53RS7CYM.js.map