mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-25 15:39:25 +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
|
@ -156,6 +156,7 @@ export class MarkdownTextArea extends Component<
|
||||||
<div className="mb-3 row">
|
<div className="mb-3 row">
|
||||||
<div className="col-12">
|
<div className="col-12">
|
||||||
<div className="rounded bg-light border">
|
<div className="rounded bg-light border">
|
||||||
|
{!this.state.previewMode && (
|
||||||
<div
|
<div
|
||||||
className={classNames("d-flex flex-wrap border-bottom", {
|
className={classNames("d-flex flex-wrap border-bottom", {
|
||||||
"no-click": this.isDisabled,
|
"no-click": this.isDisabled,
|
||||||
|
@ -206,7 +207,10 @@ export class MarkdownTextArea extends Component<
|
||||||
{this.getFormatButton("quote", this.handleInsertQuote)}
|
{this.getFormatButton("quote", this.handleInsertQuote)}
|
||||||
{this.getFormatButton("list", this.handleInsertList)}
|
{this.getFormatButton("list", this.handleInsertList)}
|
||||||
{this.getFormatButton("code", this.handleInsertCode)}
|
{this.getFormatButton("code", this.handleInsertCode)}
|
||||||
{this.getFormatButton("subscript", this.handleInsertSubscript)}
|
{this.getFormatButton(
|
||||||
|
"subscript",
|
||||||
|
this.handleInsertSubscript,
|
||||||
|
)}
|
||||||
{this.getFormatButton(
|
{this.getFormatButton(
|
||||||
"superscript",
|
"superscript",
|
||||||
this.handleInsertSuperscript,
|
this.handleInsertSuperscript,
|
||||||
|
@ -221,7 +225,7 @@ export class MarkdownTextArea extends Component<
|
||||||
<Icon icon="help-circle" classes="icon-inline" />
|
<Icon icon="help-circle" classes="icon-inline" />
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
<div>
|
<div>
|
||||||
<textarea
|
<textarea
|
||||||
id={this.id}
|
id={this.id}
|
||||||
|
|
Loading…
Reference in a new issue