mail
mail copied to clipboard
Pasted markdown lists are not displayed in CKEditor
Steps to reproduce
- Create a list in an external markdown editor
- Copy it
- Paste it in Composer
Expected behavior
Display the list correctly
Actual behavior
displayed as normal text no indication (*,- or 1.) that it's a list
Mail app version
No response
Mailserver or service
No response
Operating system
No response
PHP engine version
None
Web server
None
Database
None
Additional info
No response
Dup of https://github.com/nextcloud/mail/issues/9608
fixed in https://github.com/nextcloud/mail/issues/9608
@hamza221 is this already deployed on c.nc.com? Cause I just pasted a copied markdown text and it did not copy the list formatting.
I just copied a bullet list from an md document (app "Text") to an email on c.nc.com -> the bullet formatting was dropped.
Firefox 129. Cleared cache before.
I was able to reproduce copying from the text app Not able to reproduce with other Markdown editors
Could this be a Text issue? Copying lists from Text to Talk is also kind of broken. Some list handles are lost, others are preserved.
@alexanderdd copying lists from Text to the native Gnome text editor doesn't work either. Top level items lose their handle. Sub items remain lists.
Pasting a markdown list into CKEditor keeps the markdown format. I'd says that is somewhat expected because you don't copy a formatted string but "source code". We could consider detecting markdown and doing a conversion, as a feature.
Sorry I don't understand what info you need. As a user, I expect that I can copy a bullet list from NC Text to NC Mail and formatting will be preserved. Not sure what needs to be done for this to work.
Thank you for your feedback
I still have this issue all the time when copying work reports from the Nextcloud Notes web editor into the Nextcloud Mail compose editor (Safari 18.1.1 (20619.2.8.11.12) as well as Google Chrome 131.0.6778.86 (Offizieller Build) (arm64)). I have rich text formatting for new messages enabled by default.
Thank you for the feedback @i2h3. When copying from Notes or Text the clipboard contains broken markdown. This markdown is taken as-is by our editor.
For Notes/Text contents to be copy-pastable to Mail it would need the markdown text to be fully copyable, an automatic detection of markdown, and a conversion from markdown to HTML.
This is what happens when you copy from Notes/Text to a local text editor:
As a counter example: go to https://www.w3schools.com/html/html_lists.asp and copy a list. Paste it into Mail. The bullet points are kept, because your clipboard will contain HTML. There is no conversion necessary.
tl;dr: the problem is the content copied from Notes/Text
@ChristophWurst
tl;dr: the problem is the content copied from Notes/Text
So what is needed is a bug report in NC Text, correct? Can you do it? Otherwise I can do it.
That is correct, @alexanderdd! I checked this morning and could not find any existing reports about this. Thanks for taking the lead on this.
Well, that is funny… I started writing the issue for Nextcloud Text myself and while trying to reproduce the issue for exact descriptions of the steps involved it works. Copy and paste works from Nextcloud Text. 😕 Also from Nextcloud Notes. 😵💫 Both into macOS' TextEdit app, both plain and formatted text. But not into the editor of Nextcloud Mail. 🤔
I have to mention, though: Only works if the list is wrapped in other content like heading or normal paragraphs. If you only have a list and select only that for copying and pasting, it indeed does not copy a markdown list.
@i2h3 well observed.
We have to study where the formatting is dropped. https://ckeditor.com/ckeditor-5/demo/feature-rich/ does work with a copy-paste from Nextcloud Text (when using heading+list)
so the story continues over here https://github.com/nextcloud/text/issues/6708
please upvote it, and maybe someone has the skill to tackle it? 💯
I actually think this is a mail issue. Testing with https://ckeditor.com/ckeditor-5/demo/feature-rich/ I can confirm that copying form text works and also inspecting the clipboard content from text with https://evercoder.github.io/clipboard-inspector/ we properly pass over HTML and markdown including the list formatting.
Just pasted some unnumbered lists from NC Text into Thunderbird - works fine.
So I reopen this. (also because of Julius' comment)
Should I close https://github.com/nextcloud/text/issues/6708 ?
We have to study where the formatting is dropped. https://ckeditor.com/ckeditor-5/demo/feature-rich/ does work with a copy-paste from Nextcloud Text (when using heading+list)
Yes