From 55b168e540c2e35a42cb5bbca5c0debf5de2c8d4 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Sat, 27 May 2023 13:01:22 +0400 Subject: [PATCH] Up getContent --- src/rich_text_editor/index.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/rich_text_editor/index.ts b/src/rich_text_editor/index.ts index a5b00110b..8bcb4a43e 100644 --- a/src/rich_text_editor/index.ts +++ b/src/rich_text_editor/index.ts @@ -71,7 +71,7 @@ export interface CustomRTE { /** * Create or enable the custom RTE. */ - enable: (el: HTMLElement, rte: T) => T | Promise; + enable: (el: HTMLElement, rte: T | undefined) => T | Promise; /** * Disable the custom RTE. */ @@ -80,7 +80,7 @@ export interface CustomRTE { * Get HTML content from the custom RTE. * If not specified, it will use the innerHTML of the element (passed also as `content` in options). */ - getContent?: (el: HTMLElement, rte: T, opts: { content: string }) => string | Promise; + getContent?: (el: HTMLElement, rte: T | undefined) => string | Promise; /** * Destroy the custom RTE. * Will be triggered on editor destroy. @@ -405,13 +405,12 @@ export default class RichTextEditorModule extends Module