nilfam-editor
Version:
A powerful, customizable rich-text editor built with TipTap, React, and Tailwind CSS. Supports RTL/LTR text, resizable media (images/videos), tables, code blocks, font styling, and more for an enhanced content creation experience.
23 lines (20 loc) • 547 B
JSX
import { Node } from '@tiptap/core';
const CustomBlockquote = Node.create({
name: 'blockquote',
group: 'block',
content: 'block+',
parseHTML() {
return [{ tag: 'blockquote' }];
},
renderHTML({ HTMLAttributes }) {
return ['blockquote', HTMLAttributes, 0];
},
addCommands() {
return {
toggleBlockquote: () => ({ commands }) => {
return commands.toggleWrap('blockquote');
},
};
},
});
export default CustomBlockquote;