Numbered list in callout lost on copy
Describe the bug Lists inside callouts are not persisted when copying the file.
I suspect the created markdown is parsed to contain a list but that is not valid in our tiptap schema.
To Reproduce Steps to reproduce the behavior:
- Create a new file. Insert a callout and type a numbered list.
- Save and close the file.
- Copy the file to another file and open that.
- See no numbers inside the callout.
Expected behavior Copied file looks just like the original.
Screenshots Before copying:
After copying:
Server details: cloud.nextcloud.com with RC1 of 30.0.3
Client details: Firefox 133.0
File content after the copy
::: info
Please make sure to prepare your dev tools to capture the session so we can debug it.
0) Open the file.
1) Open your dev tools.
2) Clear your console and network tabs
3) Force reload the page
4) Run OCA.Text.debugYjs() and make sure you see the output (warning)
5) Confirm `pendingStructs` is `null`
:::
It's even worse if the list items are not separated by blank lines.
I suspect the created markdown is parsed to contain a list but that is not valid in our tiptap schema.
Indeed. I guess we would have to adjust the markdown-it-container plugin to render all content of a container as plain text. I gave it a try, but it seems a bit more complicated as simply doing so results in escaped characters (e.g. 1\. first item and \> blockquote.
I wonder whether we should instead consider to allow block elements in callouts. I guess at least lists, paragraph separation and images would be useful anyway.