From d5ed370f0835839dc145eceaad55e95af2049ac9 Mon Sep 17 00:00:00 2001 From: Daniel Ternyak Date: Thu, 6 Jun 2019 12:27:53 -0500 Subject: [PATCH] Fix Repo Link & Add Comment Length Validation (#453) --- frontend/client/components/MarkdownEditor/index.tsx | 8 +++----- frontend/client/static/markdown/CONTACT.md | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/frontend/client/components/MarkdownEditor/index.tsx b/frontend/client/components/MarkdownEditor/index.tsx index a0e86e64..90ea0d01 100644 --- a/frontend/client/components/MarkdownEditor/index.tsx +++ b/frontend/client/components/MarkdownEditor/index.tsx @@ -39,10 +39,7 @@ const commands: { [key in MARKDOWN_TYPE]: ReactMdeProps['commands'] } = { ], }, { - commands: [ - ReactMdeCommands.linkCommand, - ReactMdeCommands.quoteCommand, - ], + commands: [ReactMdeCommands.linkCommand, ReactMdeCommands.quoteCommand], }, { commands: [ @@ -104,7 +101,7 @@ export default class MarkdownEditor extends React.PureComponent { const { randomKey, value, tab } = this.state; return (
this.el = el} + ref={el => (this.el = el)} className={classnames({ MarkdownEditor: true, ['is-reduced']: type === MARKDOWN_TYPE.REDUCED, @@ -119,6 +116,7 @@ export default class MarkdownEditor extends React.PureComponent { generateMarkdownPreview={this.generatePreview} commands={commands[type]} readOnly={!!readOnly} + textAreaProps={{ maxLength: 1000 }} minEditorHeight={minHeight} minPreviewHeight={minHeight - 10} maxEditorHeight={99999} diff --git a/frontend/client/static/markdown/CONTACT.md b/frontend/client/static/markdown/CONTACT.md index 3f9fa4e5..10861b6d 100644 --- a/frontend/client/static/markdown/CONTACT.md +++ b/frontend/client/static/markdown/CONTACT.md @@ -2,4 +2,4 @@ * You may reach out to the Zcash Foundation by emailing us at contact@zfnd.org * You can find us on twitter at https://twitter.com/zcashfoundation -* You can contribute or report issues at https://github.com/zcashfoundation +* You can contribute or report issues at https://github.com/ZcashFoundation/zcash-grant-system/issues