chat: fix code mode issue

This commit is contained in:
Logan Allen 2020-08-10 19:46:41 -07:00
parent 1b0cb6694e
commit 7feb89f653
2 changed files with 1 additions and 8 deletions

View File

@ -47,6 +47,7 @@ export default class ChatEditor extends Component {
componentDidUpdate(prevProps) {
const { props } = this;
if (prevProps.message !== props.message) {
this.editor.setValue(props.message);
this.editor.setOption('mode', MARKDOWN_CONFIG);

View File

@ -173,14 +173,6 @@ export class ChatInput extends Component {
setTimeout(this.closure, 2000);*/
}
toggleCode() {
if(this.state.code) {
this.setState({ code: false });
} else {
this.setState({ code: true });
}
}
uploadSuccess(url) {
const { props } = this;
props.api.chat.message(