mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-22 12:21:13 +00:00
Hide WYSIWYG buttons when previewing markdown (#2366)
Co-authored-by: SleeplessOne1917 <insomnia-void@protonmail.com>
This commit is contained in:
parent
77cd46b35b
commit
40ade7df88
1 changed files with 67 additions and 63 deletions
|
@ -156,6 +156,7 @@ export class MarkdownTextArea extends Component<
|
|||
<div className="mb-3 row">
|
||||
<div className="col-12">
|
||||
<div className="rounded bg-light border">
|
||||
{!this.state.previewMode && (
|
||||
<div
|
||||
className={classNames("d-flex flex-wrap border-bottom", {
|
||||
"no-click": this.isDisabled,
|
||||
|
@ -206,7 +207,10 @@ export class MarkdownTextArea extends Component<
|
|||
{this.getFormatButton("quote", this.handleInsertQuote)}
|
||||
{this.getFormatButton("list", this.handleInsertList)}
|
||||
{this.getFormatButton("code", this.handleInsertCode)}
|
||||
{this.getFormatButton("subscript", this.handleInsertSubscript)}
|
||||
{this.getFormatButton(
|
||||
"subscript",
|
||||
this.handleInsertSubscript,
|
||||
)}
|
||||
{this.getFormatButton(
|
||||
"superscript",
|
||||
this.handleInsertSuperscript,
|
||||
|
@ -221,7 +225,7 @@ export class MarkdownTextArea extends Component<
|
|||
<Icon icon="help-circle" classes="icon-inline" />
|
||||
</a>
|
||||
</div>
|
||||
|
||||
)}
|
||||
<div>
|
||||
<textarea
|
||||
id={this.id}
|
||||
|
|
Loading…
Reference in a new issue