Make text editor level start at 3, 4, 5

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-10-31 18:04:30 +01:00
parent 1282bbf0f4
commit 1592ae8fe9
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -44,8 +44,8 @@
<button
v-if="!isBasicMode"
class="menubar__button"
:class="{ 'is-active': editor?.isActive('heading', { level: 1 }) }"
@click="editor?.chain().focus().toggleHeading({ level: 1 }).run()"
:class="{ 'is-active': editor?.isActive('heading', { level: 3 }) }"
@click="editor?.chain().focus().toggleHeading({ level: 3 }).run()"
type="button"
:title="t('Heading Level 1')"
>
@ -55,8 +55,8 @@
<button
v-if="!isBasicMode"
class="menubar__button"
:class="{ 'is-active': editor?.isActive('heading', { level: 2 }) }"
@click="editor?.chain().focus().toggleHeading({ level: 2 }).run()"
:class="{ 'is-active': editor?.isActive('heading', { level: 4 }) }"
@click="editor?.chain().focus().toggleHeading({ level: 4 }).run()"
type="button"
:title="t('Heading Level 2')"
>
@ -66,8 +66,8 @@
<button
v-if="!isBasicMode"
class="menubar__button"
:class="{ 'is-active': editor?.isActive('heading', { level: 3 }) }"
@click="editor?.chain().focus().toggleHeading({ level: 3 }).run()"
:class="{ 'is-active': editor?.isActive('heading', { level: 5 }) }"
@click="editor?.chain().focus().toggleHeading({ level: 5 }).run()"
type="button"
:title="t('Heading Level 3')"
>
@ -309,7 +309,9 @@ const editor = useEditor({
extensions: [
Blockquote,
BulletList,
Heading,
Heading.configure({
levels: [3, 4, 5],
}),
Document,
Paragraph,
Text,