update selectors

This commit is contained in:
2024-04-24 22:34:28 +10:00
parent 70f9d736d1
commit 6208676207
2 changed files with 5 additions and 9 deletions

View File

@@ -4,12 +4,10 @@ import {mergeAttributes, Node} from '@tiptap/core'
export const ExtraSmall = Node.create({
name: 'extraSmall',
priority: 1000,
addOptions() {
return {
HTMLAttributes: {
class: 'text-xs',
class: 'text-xs pb-4',
},
}
},
@@ -19,7 +17,7 @@ export const ExtraSmall = Node.create({
content: 'inline*',
parseHTML() {
return [{ tag: 'p.text-xs' }]
return [{ tag: 'p.text-xs.pb-4' }]
},
renderHTML({ HTMLAttributes }) {

View File

@@ -4,12 +4,10 @@ import {mergeAttributes, Node} from '@tiptap/core'
export const Small = Node.create({
name: 'small',
priority: 2000,
addOptions() {
return {
HTMLAttributes: {
class: 'text-sm',
class: 'text-sm pb-4',
},
}
},
@@ -20,12 +18,12 @@ export const Small = Node.create({
parseHTML() {
return [{
tag: 'p.text-sm',
tag: 'div.text-sm.pb-4',
}]
},
renderHTML({ HTMLAttributes }) {
return ['p', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]
return ['div', mergeAttributes(this.options.HTMLAttributes, HTMLAttributes), 0]
},
addCommands() {