From 0fe7d693e4f7b0d360ab609d12f7b64f3f55a39f Mon Sep 17 00:00:00 2001 From: Diamantis Tziotzios Date: Fri, 31 May 2024 09:58:22 +0300 Subject: [PATCH] rich text editor update --- .../rich-text-editor/rich-text-editor.component.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/dmp-frontend/src/app/library/rich-text-editor/rich-text-editor.component.ts b/dmp-frontend/src/app/library/rich-text-editor/rich-text-editor.component.ts index 7cd6e9b88..b9c73c95f 100644 --- a/dmp-frontend/src/app/library/rich-text-editor/rich-text-editor.component.ts +++ b/dmp-frontend/src/app/library/rich-text-editor/rich-text-editor.component.ts @@ -23,7 +23,7 @@ import { Subscription } from "rxjs"; changeDetection: ChangeDetectionStrategy.OnPush }) export class RichTextEditorComponent implements OnInit, OnChanges, OnDestroy { - + @Input() form: FormControl; @Input() id: string = "editor1"; @Input() placeholder: string = "Enter text"; @@ -57,7 +57,8 @@ export class RichTextEditorComponent implements OnInit, OnChanges, OnDestroy { { name: 'H3 header', class: '', tag: 'h3' }, { name: 'H4 header', class: '', tag: 'h4' }, { name: 'H5 header', class: '', tag: 'h5' }, - { name: 'H6 header', class: '', tag: 'h6' } + { name: 'H6 header', class: '', tag: 'h6' }, + { name: 'Highlight', class: '', tag: 'mark' } ], toolbarHiddenButtons: [ [ @@ -66,12 +67,16 @@ export class RichTextEditorComponent implements OnInit, OnChanges, OnDestroy { ], [ 'fontSize', - // 'backgroundColor', + 'backgroundColor', // 'customClasses', 'insertImage', 'insertVideo', // 'removeFormat', 'toggleEditorMode' + ], + [ + 'indent', + 'outdent' ] ] }; @@ -109,7 +114,7 @@ export class RichTextEditorComponent implements OnInit, OnChanges, OnDestroy { this.formTouchSubscription = this.formTouchEvent .subscribe( next => { - if(next) { + if (next) { this.form.markAsTouched(); this.form.updateValueAndValidity(); }