mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
feat(post form): replace single return with double return on submit, because markdown is mandatory on plebbit, but a user from 4chan won't know that
This commit is contained in:
@@ -183,7 +183,8 @@ const PostFormTable = ({ closeForm }: { closeForm: () => void }) => {
|
|||||||
wrap='soft'
|
wrap='soft'
|
||||||
ref={textRef}
|
ref={textRef}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
isInPostPage ? setContent.content(e.target.value) : setSubmitStore({ content: e.target.value });
|
const content = e.target.value.replace(/\n/g, '\n\n');
|
||||||
|
isInPostPage ? setContent.content(content) : setSubmitStore({ content });
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -95,7 +95,10 @@ const ReplyModal = ({ closeModal, parentCid, scrollY }: ReplyModalProps) => {
|
|||||||
wrap='soft'
|
wrap='soft'
|
||||||
ref={textRef}
|
ref={textRef}
|
||||||
placeholder={_.capitalize(t('comment'))}
|
placeholder={_.capitalize(t('comment'))}
|
||||||
onChange={(e) => setContent.content(e.target.value)}
|
onChange={(e) => {
|
||||||
|
const content = e.target.value.replace(/\n/g, '\n\n');
|
||||||
|
setContent.content(content);
|
||||||
|
}}
|
||||||
autoFocus={!isMobile} // autofocus causes auto scroll to top on mobile
|
autoFocus={!isMobile} // autofocus causes auto scroll to top on mobile
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user