fix: fix tiptap extension

This commit is contained in:
fantasticit 2022-03-12 18:32:59 +08:00
parent 242afc277d
commit c9c5badbb5
9 changed files with 10 additions and 5 deletions

View File

@ -32,6 +32,7 @@ export const Attachment = Node.create({
name: 'attachment',
group: 'block',
draggable: true,
atom: true,
addOptions() {
return {

View File

@ -33,6 +33,7 @@ const DocumentChildrenExtension = Node.create({
group: 'block',
defining: true,
draggable: true,
atom: true,
addAttributes() {
return {

View File

@ -23,6 +23,7 @@ const DocumentReferenceExtension = Node.create({
group: 'block',
defining: true,
draggable: true,
atom: true,
addAttributes() {
return {

View File

@ -10,6 +10,7 @@ const IframeNode = Node.create({
marks: '',
group: 'block',
draggable: true,
atom: true,
addOptions() {
return {

View File

@ -23,6 +23,7 @@ const KatexExtension = Node.create({
group: 'block',
defining: true,
draggable: true,
atom: true,
addAttributes() {
return {

View File

@ -25,6 +25,7 @@ const MindNode = Node.create({
marks: '',
group: 'block',
draggable: true,
atom: true,
addOptions() {
return {

View File

@ -16,6 +16,7 @@ const StatusExtension = Node.create({
content: 'text*',
group: 'inline',
inline: true,
atom: true,
addAttributes() {
return {

View File

@ -17,18 +17,18 @@ const Title = Node.create({
parseHTML() {
return [
{
tag: 'div[class=title]',
tag: 'h1[class=title]',
},
];
},
renderHTML({ HTMLAttributes }) {
return ['div', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
return ['h1', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0];
},
});
const TitledDocument = Document.extend({
content: 'title block*',
content: 'title block+',
});
export { Document, Title, TitledDocument };

View File

@ -63,9 +63,7 @@ const Component = ({ editor }) => {
export const Toc = Node.create({
name: 'tableOfContents',
group: 'block',
atom: true,
parseHTML() {