You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you rename an .md file to a .txt file, the content will be lost after opening it in the built-in text editor.
If you download the renamed file before opening it in the built-in text editor, the content is retained.
To Reproduce
Steps to reproduce the behavior:
Create or upload a new .md-File with some content
Open the file with the text editor and check the content
Close the file and rename it to example_filename.txt
Open the example_filename.txt-File with the text editor
Expected behavior
After renaming from .md to .txt, the former content should be retained after opening with the text editor.
Screenshots
Server details:
Nextcloud version: 28.0.2
PHP Version: 8.1
Database: MariaDB 10.5.23
Client details:
OS: Fedora 39
Browser: Chrome
Browser version: 123.0.6312.122
Device: Desktop
The text was updated successfully, but these errors were encountered:
I was able to reproduce this. Definitely something we should look into. @juliushaertl@max-nextcloud any idea what is happening here? I would have expected the markdown source to be displayed in the editor instead of all content being deleted 🤔
I suspect the file id stays the same after the rename but the file is now opened with the plaintext editor rather than the markdown editor. At the same time it tries to recover the y.js state from the previous editing session which is invalid in the plaintext editor context.
Describe the bug
If you rename an .md file to a .txt file, the content will be lost after opening it in the built-in text editor.
If you download the renamed file before opening it in the built-in text editor, the content is retained.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
After renaming from .md to .txt, the former content should be retained after opening with the text editor.
Screenshots
Server details:
Client details:
The text was updated successfully, but these errors were encountered: