Pasting markdown does not apply styling
This is what happens when you paste some markdown text, e.g. from Lorem Markdownum:

Should probably be highlighted as markdown properly, or is that difficult?
Prosemirror.net has the same issue, so I guess itβs upstream? Or maybe a setting?
It should be possible if we implement our own paste handler as described in https://discuss.prosemirror.net/t/support-pasting-markdown/699/6
Tiptap has support for pasting inline marks https://github.com/scrumpy/tiptap/pull/184/files
I guess we should try to extend on that to also have nodes supported
@jancborchardt How should we distinguish if the user wants to paste markdown or plain text?
Hmmmm good question. Does Prosemirror or tiptap not have a default or mechanism for that?
@jancborchardt How should we distinguish if the user wants to paste markdown or plain text?
Other text entry UIs appear to commonly use Ctrl-v to paste directly from the clipboard (including markup and images) and Ctrl-Shift-v to attempt to paste the clipboard as plain text. Some right-click menus provide the choice of how to paste what's on the clipboard.
I had this problem too. IMHO this should be higher priority :) Pretty Please :)
First implementation draft at https://github.com/nextcloud/text/pull/2716
Just thinking, ahead of time - there are times when I paste some formatted text, and incorrect markdown formatting is applied (I think it may e.g. detect monospace and apply code formatting here, when I don't necessarily want it to).
I'm gonna guess after this feature, someone may come back and say that they're end-users rather than programmers, and prefer to paste in symbols from their text as literal, without applying them as markdown syntax. Such users may be more comfortable with the WYSIWYG-style formatting options present in the editor than using markdown syntax itself.
Therefore, there may be a case for having a paste menu with options on which action to perform (and a default to apply when hitting Ctrl+V). I reckon this would be useful for other use-cases too, and overall am thinking a bit how LO lets you paste as plain text, formatted text, etc. A menu allowing to "paste and interpret as markdown", "paste as (literal) plain text", "paste formatted text", etc. for example, time permitting.
there are times when I paste some formatted text
The implementation only acts on plain text paste. Formatted text e.g. from a web page or external editor would take precedence and not apply the markdown parsing.
In general depending on user feedback we might still want to rethink exposing the paste modes differently.
I would also like to see this feature added. Personally, I tried to select the text and then clicked right and looked for a button to convert.
Adding another use case, I just pasted a URL and had the underscores convert the text to italics, rendering the URL a bit unusable. It is a little jarring, and I think whatever default behaviour made most sense (possibly a compromise) would be fine for me, if I always had the option to paste explicitly without interpreting formatting, and to paste explicitly with interpretation. An probably the third option, to paste rich text and convert internally to markdown equivalent.
The implementation only acts on plain text paste. Formatted text e.g. from a web page or external editor would take precedence and not apply the markdown parsing.
IDK what happens here, but I paste something in and suddenly it's in a code block, when the original text wasn't code. It can be quite an inconvenience when I have many lines I am trying to paste. Based on what you're saying, it may be that the original was rich text, and then it's being erroneously interpreted as a code block.
Ultimately it's not uncommon I break open Kate and work on the file there, and then upload it or paste, mainly because of this feature, which adds a bit to my workflow. I do this in other situations too for nextcloud (Collabora, I'm looking at you), to get round a few teething issues, so it's not unique to this app.