From 284b1886ae614eac744f9254529961a1eef4a83c Mon Sep 17 00:00:00 2001 From: rhenck <richard.henck@iqb.hu-berlin.de> Date: Sat, 20 Nov 2021 20:49:56 +0100 Subject: [PATCH] [editor] TextEditor: Change list button behaviour to toggle list (when not set) --- .../src/app/text-editor/rich-text-editor.component.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/editor/src/app/text-editor/rich-text-editor.component.ts b/projects/editor/src/app/text-editor/rich-text-editor.component.ts index d5d59cd05..d9af04653 100644 --- a/projects/editor/src/app/text-editor/rich-text-editor.component.ts +++ b/projects/editor/src/app/text-editor/rich-text-editor.component.ts @@ -125,9 +125,15 @@ export class RichTextEditorComponent implements AfterViewInit { if (listType === 'bulletList') { this.bulletListStyle = style; this.editor.commands.setBulletListStyle(style); + if (!this.editor.isActive('bulletList')) { + this.toggleBulletList(); + } } else { this.orderedListStyle = style; this.editor.commands.setOrderedListStyle(style); + if (!this.editor.isActive('orderedList')) { + this.togleOrderedList(); + } } } -- GitLab