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