-
Notifications
You must be signed in to change notification settings - Fork 839
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
[EuiMarkdownEditor] Enhancement request: "Newlines -> line breaks" as a default plugin #5141
Comments
This one would be a breaking change, and a potentially significant one as a lot of markdown uses is UGC. The component is marked as beta, but if I were a consumer I'd be unhappy about this change. Closing this, but if anyone feels strongly otherwise feel free to re-open for discussion. |
I disagree that consumers would be unhappy with this change. I think it is the more expected behavior than what it currently does and/or could be a setting that is something like |
I'm convinced. I think we should avoid any new prop / configuration and just go with it, and maybe allow opting out with the incoming configuration - miukimiu@90a669a#diff-d5fec82a5af6bfbe83ee2cee3b7aad4e015f98f57996b8f8eb703a14688efbc0R74. |
This is expected behaviour for markdown. |
heya all, (especially @miukimiu), I'm wondering if there's any timeline or prioritization happening on this one? asking because it's something that's preventing us from using |
Hi @i-a-n, My first approach was not ideal: #5059. So I closed the issue. Then I did some experiments locally and talked with @chandlerprall about it. No ideal too. So we agreed on the following approach:
This is something an engineer has to do. So let's see what @chandlerprall says about timeline or prioritization. But I would say if this is something that is not difficult to do, and you have time, you can open a PR instead of writing a custom plugin. |
perfect, thanks for the update @miukimiu, I'll try to help with that |
I notice that, since
EuiMarkdownEditor
is using Remark to process/render markdown, it follows Remark's default behavior and does not render single newlines as actual line breaks (<br>
):I know this behavior is technically up to spec, and GitHub et al. are doing their own extra processing to make newlines into
<br>
s, but would you consider adding a default plugin to mimic this newline -> line break processing? There is a Remark plugin called remark-breaks which already does this, and should hopefully be simple to implement. Would this be something you'd consider, or will we need to create our own processing plugin for this?The text was updated successfully, but these errors were encountered: