diff --git a/extension/chrome/elements/compose-modules/compose-input-module.ts b/extension/chrome/elements/compose-modules/compose-input-module.ts index 97691cc7800..f53e5431a7d 100644 --- a/extension/chrome/elements/compose-modules/compose-input-module.ts +++ b/extension/chrome/elements/compose-modules/compose-input-module.ts @@ -36,13 +36,11 @@ export class ComposeInputModule extends ViewModule { } public setHandlers = () => { + this.toggleRichTextFormatting(); this.view.S.cached('add_intro').on( 'click', this.view.setHandler(el => this.actionAddIntroHandler(el), this.view.errModule.handle(`add intro`)) ); - if (this.isRichText()) { - this.initSquire(true); - } // Set lastDraftBody to current empty squire content ex:

) // https://github.com/FlowCrypt/flowcrypt-browser/issues/5184 this.view.draftModule.setLastDraftBody(this.squire.getHTML()); @@ -107,6 +105,14 @@ export class ComposeInputModule extends ViewModule { return isInputLimitExceeded; }; + private toggleRichTextFormatting = () => { + if (this.isRichText()) { + this.addRichTextFormatting(); + } else { + this.removeRichTextFormatting(); + } + }; + private initSquire = (addLinks: boolean, removeExistingLinks = false) => { const squireHtml = this.squire?.getHTML(); const el = this.view.S.cached('input_text').get(0);