Tui.editor: Editor add `<br>` in code block when user press enter

Created on 27 Oct 2020  路  6Comments  路  Source: nhn/tui.editor

Summary

Why Editor add <br> when user enter with code block?

Screenshots

This is mode WTSIWYG:
image

This is mode Markdown:
image

Actually: I wanna this ( no <br> in mode markdown ) :
image

Is that config for this?

Version

Lastest

Additional context

Question inactive

Most helpful comment

@seonim-ryu

These extra <br>s are problematic for things i'm using the editor for. For example when they get added before a markdown table you'll end up with output like

<br>
| Name |
| ---- |

which will render fine in your viewer, but if i take the output markdown and want to have it in a GitHub Readme, or run it through markedjs then the table won't be recognized.

All 6 comments

@ngthtung Added <br> to match different usability between WYSIWYG and Markdown. In WYSIWYG, an empty newline is added when you hit enter, and there is no way to keep the added newline when you convert it to WYSIWYG -> Markdown -> WYSIWYG.

Currently, the default specification is to add <br>, but we will discuss to add an option.

@seonim-ryu Thank you. So this is a feature need to be discussed? I will close this issues?

@seonim-ryu

These extra <br>s are problematic for things i'm using the editor for. For example when they get added before a markdown table you'll end up with output like

<br>
| Name |
| ---- |

which will render fine in your viewer, but if i take the output markdown and want to have it in a GitHub Readme, or run it through markedjs then the table won't be recognized.

+1, I have same problem.

This issue has been automatically marked as inactive because there hasn鈥檛 been much going on it lately. It is going to be closed after 7 days. Thanks!

This issue will be closed due to inactivity. Thanks for your contribution!

Was this page helpful?
0 / 5 - 0 ratings