[222] change headers signature in Editor (#113)

This commit is contained in:
Ilya Y 2023-06-24 17:45:57 +03:00 committed by GitHub
parent 236c469c98
commit 55e8f6a20a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 7 deletions

View File

@ -132,7 +132,7 @@ export const Editor = (props: EditorProps) => {
openOnClick: false openOnClick: false
}), }),
Heading.configure({ Heading.configure({
levels: [1, 2, 3] levels: [2, 3, 4]
}), }),
BulletList, BulletList,
OrderedList, OrderedList,

View File

@ -31,9 +31,9 @@ export const TextBubbleMenu = (props: BubbleMenuProps) => {
const isBold = isActive('bold') const isBold = isActive('bold')
const isItalic = isActive('italic') const isItalic = isActive('italic')
const isH1 = isActive('heading', { level: 1 }) const isH1 = isActive('heading', { level: 2 })
const isH2 = isActive('heading', { level: 2 }) const isH2 = isActive('heading', { level: 3 })
const isH3 = isActive('heading', { level: 3 }) const isH3 = isActive('heading', { level: 4 })
const isBlockQuote = isActive('blockquote') const isBlockQuote = isActive('blockquote')
const isOrderedList = isActive('isOrderedList') const isOrderedList = isActive('isOrderedList')
const isBulletList = isActive('isBulletList') const isBulletList = isActive('isBulletList')
@ -117,7 +117,7 @@ export const TextBubbleMenu = (props: BubbleMenuProps) => {
[styles.bubbleMenuButtonActive]: isH1() [styles.bubbleMenuButtonActive]: isH1()
})} })}
onClick={() => { onClick={() => {
props.editor.chain().focus().toggleHeading({ level: 1 }).run() props.editor.chain().focus().toggleHeading({ level: 2 }).run()
toggleTextSizePopup() toggleTextSizePopup()
}} }}
> >
@ -134,7 +134,7 @@ export const TextBubbleMenu = (props: BubbleMenuProps) => {
[styles.bubbleMenuButtonActive]: isH2() [styles.bubbleMenuButtonActive]: isH2()
})} })}
onClick={() => { onClick={() => {
props.editor.chain().focus().toggleHeading({ level: 2 }).run() props.editor.chain().focus().toggleHeading({ level: 3 }).run()
toggleTextSizePopup() toggleTextSizePopup()
}} }}
> >
@ -151,7 +151,7 @@ export const TextBubbleMenu = (props: BubbleMenuProps) => {
[styles.bubbleMenuButtonActive]: isH3() [styles.bubbleMenuButtonActive]: isH3()
})} })}
onClick={() => { onClick={() => {
props.editor.chain().focus().toggleHeading({ level: 3 }).run() props.editor.chain().focus().toggleHeading({ level: 4 }).run()
toggleTextSizePopup() toggleTextSizePopup()
}} }}
> >