diff --git a/src/core/features/editor/components/rich-text-editor/rich-text-editor.ts b/src/core/features/editor/components/rich-text-editor/rich-text-editor.ts index fde9e250e..6df15894d 100644 --- a/src/core/features/editor/components/rich-text-editor/rich-text-editor.ts +++ b/src/core/features/editor/components/rich-text-editor/rich-text-editor.ts @@ -174,6 +174,7 @@ export class CoreEditorRichTextEditorComponent implements OnInit, AfterViewInit, this.lastDraft = this.control?.value; // Use paragraph on enter. + // eslint-disable-next-line deprecation/deprecation document.execCommand('DefaultParagraphSeparator', false, 'p'); this.maximizeEditorSize(); @@ -632,6 +633,7 @@ export class CoreEditorRichTextEditorComponent implements OnInit, AfterViewInit, */ protected executeCommand({ name: command, parameters }: EditorCommand): void { if (parameters == 'block') { + // eslint-disable-next-line deprecation/deprecation document.execCommand('formatBlock', false, '<' + command + '>'); return; @@ -641,6 +643,7 @@ export class CoreEditorRichTextEditorComponent implements OnInit, AfterViewInit, this.toolbarStyles[parameters] = this.toolbarStyles[parameters] == 'true' ? 'false' : 'true'; } + // eslint-disable-next-line deprecation/deprecation document.execCommand(command, false); // Modern browsers are using non a11y tags, so replace them. @@ -1043,6 +1046,7 @@ export class CoreEditorRichTextEditorComponent implements OnInit, AfterViewInit, if (text) { this.editorElement?.focus(); // Make sure the editor is focused. + // eslint-disable-next-line deprecation/deprecation document.execCommand('insertText', false, text); } } diff --git a/src/core/services/lang.ts b/src/core/services/lang.ts index f85eb43c8..78fd63355 100644 --- a/src/core/services/lang.ts +++ b/src/core/services/lang.ts @@ -349,12 +349,15 @@ export class CoreLangProvider { getTranslationTable(lang: string): Promise> { // Create a promise to convert the observable into a promise. return new Promise((resolve, reject): void => { - const observer = Translate.getTranslation(lang).subscribe((table) => { - resolve(table); - observer.unsubscribe(); - }, (err) => { - reject(err); - observer.unsubscribe(); + const observer = Translate.getTranslation(lang).subscribe({ + next: (table) => { + resolve(table); + observer.unsubscribe(); + }, + error: (err) => { + reject(err); + observer.unsubscribe(); + }, }); }); } diff --git a/src/core/services/utils/utils.ts b/src/core/services/utils/utils.ts index 147930bb8..16ccfe1f2 100644 --- a/src/core/services/utils/utils.ts +++ b/src/core/services/utils/utils.ts @@ -376,7 +376,7 @@ export class CoreUtilsProvider { virtualInput.innerHTML = text; virtualInput.select(); virtualInput.setSelectionRange(0, 99999); - document.execCommand('copy'); + document.execCommand('copy'); // eslint-disable-line deprecation/deprecation } // Show toast using ionicLoading.