nextcloud / text

📑 Collaborative document editing using Markdown
GNU Affero General Public License v3.0
552 stars 91 forks source link

Cannot open json or yaml files #426

Closed Perflyst closed 2 years ago

Perflyst commented 4 years ago

Describe the bug Newly created json or yaml files cant be opened

To Reproduce Steps to reproduce the behavior:

  1. Create a new test.json via web gui
  2. Click on this test.json file

Expected behavior File should just open as any other .txt or .md

Client details:

Server details **Text app version:** (see Nextcloud apps page) 1.1.1 **Operating system:** Debian 10 **Web server:** nginx **Database:** pgsql **PHP version:** 7.3 **Nextcloud version:** (see Nextcloud admin page) 17.0.1
Logs #### Browser log ``` Unhandled promise rejection Error ​ columnNumber: 1304 ​ fileName: "https://cloud.domain.tld/apps/files_texteditor/build/editor.js?v=076ec045-35" ​ lineNumber: 1 ​ message: "Loading chunk 14 failed." ​ stack: "l@https://cloud.domain.tld/apps/files_texteditor/build/editor.js?v=076ec045-35:1:1304\n" ​ __proto__: Object { … } main.js:230:27761 O/ https://cloud.domain.tld/core/js/dist/main.js:181:5609 v https://cloud.domain.tld/core/js/dist/main.js:181:5467 y https://cloud.domain.tld/core/js/dist/main.js:181:5487 ```
Friptick commented 4 years ago

Surely related to #418 and #424. The editor will mangle any text file with .md extension which is not already valid markdown.

The obvious solution is the same simple one: provide a plaintext mode, to enable editing of arbitrary text. No buttons. No WYSIWYG.

This seems like quite a serious bug. Right now this editor cannot be used to edit code. But code is text too.

susnux commented 2 years ago

This seems to be already fixed Screenshot 2022-06-23 at 02-11-12 test yaml - Nextcloud

mejo- commented 2 years ago

Indeed, I just tested myself and it's fixed.

Let me take this opportunity to again thank you for all this bug triaging @susnux :heart: