From: Dessalines Date: Mon, 22 Feb 2021 02:30:11 +0000 (-0500) Subject: Fixing markup not throwing onContentChange. Fixes #182 X-Git-Url: http://these/git/%22%7Burl%7D/%22https:/image.com/%7Bpost.url%7D?a=commitdiff_plain;h=12e27b4c6452ca25f632f33a35e8c51fad21b252;p=lemmy-ui.git Fixing markup not throwing onContentChange. Fixes #182 --- diff --git a/src/shared/components/markdown-textarea.tsx b/src/shared/components/markdown-textarea.tsx index a857930..1aaf4db 100644 --- a/src/shared/components/markdown-textarea.tsx +++ b/src/shared/components/markdown-textarea.tsx @@ -1,5 +1,5 @@ -import { Component, linkEvent } from 'inferno'; -import { Prompt } from 'inferno-router'; +import { Component, linkEvent } from "inferno"; +import { Prompt } from "inferno-router"; import { mdToHtml, randomStr, @@ -9,12 +9,12 @@ import { pictrsDeleteToast, setupTippy, isBrowser, -} from '../utils'; -import { UserService } from '../services'; -import autosize from 'autosize'; -import { i18n } from '../i18next'; -import { pictrsUri } from '../env'; -import { Icon, Spinner } from './icon'; +} from "../utils"; +import { UserService } from "../services"; +import autosize from "autosize"; +import { i18n } from "../i18next"; +import { pictrsUri } from "../env"; +import { Icon, Spinner } from "./icon"; interface MarkdownTextAreaProps { initialContent: string; @@ -65,7 +65,7 @@ export class MarkdownTextArea extends Component< if (textarea) { autosize(textarea); this.tribute.attach(textarea); - textarea.addEventListener('tribute-replaced', () => { + textarea.addEventListener("tribute-replaced", () => { this.state.content = textarea.value; this.setState(this.state); autosize.update(textarea); @@ -94,7 +94,7 @@ export class MarkdownTextArea extends Component< if (nextProps.finished) { this.state.previewMode = false; this.state.loading = false; - this.state.content = ''; + this.state.content = ""; this.setState(this.state); if (this.props.replyType) { this.props.onReplyCancel(); @@ -117,13 +117,13 @@ export class MarkdownTextArea extends Component<