diff --git a/src/components/post-form/post-form.tsx b/src/components/post-form/post-form.tsx index eb384f4a..b008f362 100644 --- a/src/components/post-form/post-form.tsx +++ b/src/components/post-form/post-form.tsx @@ -183,7 +183,8 @@ const PostFormTable = ({ closeForm }: { closeForm: () => void }) => { wrap='soft' ref={textRef} 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 }); }} /> diff --git a/src/components/reply-modal/reply-modal.tsx b/src/components/reply-modal/reply-modal.tsx index d992e893..0b0a069c 100644 --- a/src/components/reply-modal/reply-modal.tsx +++ b/src/components/reply-modal/reply-modal.tsx @@ -95,7 +95,10 @@ const ReplyModal = ({ closeModal, parentCid, scrollY }: ReplyModalProps) => { wrap='soft' ref={textRef} 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 />