Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blank line disappear when pasting text from viewer (or preview) (3MD) #499

Closed
sohee-lee7 opened this issue May 16, 2019 · 0 comments · Fixed by #514
Closed

blank line disappear when pasting text from viewer (or preview) (3MD) #499

sohee-lee7 opened this issue May 16, 2019 · 0 comments · Fixed by #514

Comments

@sohee-lee7
Copy link
Contributor

sohee-lee7 commented May 16, 2019

Version

v1.4.0

Test Environment

Chrome

Current Behavior

AAA
BBB

CCC
DDD

=> It is rendered like below. (Each <p> has margin so look like there is an empty line between two paragraph.)

<p>AAA<br>BBB</p>
<p>CCC<br>DDD</p>

=> When it is pasted, there is no tags for empty line between <p>. So it will be pasted like this:
AAA
BBB
CCC
DDD

Expected Behavior

Should be pasted like this:

AAA
BBB

CCC
DDD

Solution

Insert <br> between <p>.

By default, browsers separate paragraphs with a single blank line.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p#Styling_paragraphs

But Word or PowerPoint use <p> as one line.

But when <p> is used for meaning one line (ex: pptx and other editors that use <p> for one line), unexpected empty line is generated when pasting.

@sohee-lee7 sohee-lee7 added this to the 1.4.2 milestone May 16, 2019
@sohee-lee7 sohee-lee7 changed the title blank line disappear when pasting text from viewer (or preview) blank line disappear when pasting text from viewer (or preview) (3MD) May 17, 2019
sohee-lee7 pushed a commit that referenced this issue May 28, 2019
@sohee-lee7 sohee-lee7 self-assigned this Jun 5, 2019
kishorethecoder pushed a commit to kishorethecoder/tui.editor that referenced this issue Jul 11, 2019
kishorethecoder pushed a commit to kishorethecoder/tui.editor that referenced this issue Jul 11, 2019
kishorethecoder added a commit to kishorethecoder/tui.editor that referenced this issue Dec 4, 2019
kishorethecoder added a commit to kishorethecoder/tui.editor that referenced this issue Dec 4, 2019
kishorethecoder added a commit to kishorethecoder/tui.editor that referenced this issue Dec 4, 2019
kishorethecoder added a commit to kishorethecoder/tui.editor that referenced this issue Dec 4, 2019
seonim-ryu pushed a commit that referenced this issue Jan 2, 2020
seonim-ryu pushed a commit that referenced this issue Jan 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant