From 40ade7df88f124fb316f70881e557063ab43795d Mon Sep 17 00:00:00 2001 From: SleeplessOne1917 <28871516+SleeplessOne1917@users.noreply.github.com> Date: Fri, 16 Feb 2024 22:57:07 +0000 Subject: [PATCH] Hide WYSIWYG buttons when previewing markdown (#2366) Co-authored-by: SleeplessOne1917 --- .../components/common/markdown-textarea.tsx | 130 +++++++++--------- 1 file changed, 67 insertions(+), 63 deletions(-) diff --git a/src/shared/components/common/markdown-textarea.tsx b/src/shared/components/common/markdown-textarea.tsx index 2d2e96b7..25f7734f 100644 --- a/src/shared/components/common/markdown-textarea.tsx +++ b/src/shared/components/common/markdown-textarea.tsx @@ -156,72 +156,76 @@ export class MarkdownTextArea extends Component<
-
- {this.getFormatButton("bold", this.handleInsertBold)} - {this.getFormatButton("italic", this.handleInsertItalic)} - {this.getFormatButton("link", this.handleInsertLink)} - - - - {this.getFormatButton("header", this.handleInsertHeader)} - {this.getFormatButton( - "strikethrough", - this.handleInsertStrikethrough, - )} - {this.getFormatButton("quote", this.handleInsertQuote)} - {this.getFormatButton("list", this.handleInsertList)} - {this.getFormatButton("code", this.handleInsertCode)} - {this.getFormatButton("subscript", this.handleInsertSubscript)} - {this.getFormatButton( - "superscript", - this.handleInsertSuperscript, - )} - {this.getFormatButton("spoiler", this.handleInsertSpoiler)} - - - -
- + {this.getFormatButton("quote", this.handleInsertQuote)} + {this.getFormatButton("list", this.handleInsertList)} + {this.getFormatButton("code", this.handleInsertCode)} + {this.getFormatButton( + "subscript", + this.handleInsertSubscript, + )} + {this.getFormatButton( + "superscript", + this.handleInsertSuperscript, + )} + {this.getFormatButton("spoiler", this.handleInsertSpoiler)} + + + +
+ )}