Repository navigation
Add setting to create new files with markdown file extension (.md) #24
Description
Activity
Should we introduce a setting for this? I think defaulting it to
.mdmight irritate some users which are unable to open it on their system because they have never seen this extension. But I could be overthinking this.
@jancborchardt your opinion on this?Reacted by korelstar, Ben Schumacher, Hüseyin Kozan, Tobias Brunner, treuss and Nathan FriedlyReacted by Ben Schumacher and Nastuzzi SamyI vote definitely for a setting for this.
.mdis too nerdy to be the default. 😎Reacted by Dustin Skoracki and m¡zt¡zm- changed the title
[-]Create new files with markdown file extension (.md, .mdown, .markdown)[/-][+]Add setting to create new files with markdown file extension (.md)[/+]on Dec 10, 2016 Another idea:
Instead of adding a setting, I would suggest to do it similar to the Files app, which adds .txt by default to the end of a new file.- Add .md by default to the end of a new note. If someone overwrites .md with .txt for whatever reason, accept it. Save the note with the according file extension. If someone adds another file extension, display an error like "File extension unsupported. Please use '.md' or '.txt'!".
- Add an info box, explaining .md (for all the non-nerds): "The Notes app uses Markdown to save notes. The default file extension for Markdown is '.md'. If you prefer, you can also use '.txt' alternatively."
Sooo first off, @icewind1991’s Markdown editor should simply also recognize txt files. ;)
About the rest I need to think more, but .md should not be a default for sure. It’s only used and known by a tiny percentage of people.
So, I really would like to have the setting. Otherwise I will have to write a service that checks the Notes folder and replaces the extension.
And I am curios: Would users that don't know about
.mdreally manually edit their notes with a text editor or would they have another notes app for mobile/desktop?The problem with a setting is (as I also told @Henni) that it can’t be a global setting really. Because sometimes you might write markdown, sometimes just text.
Isn’t there a way we can detect as soon as markdown is used and rename? I mean, the title can also change at any point. And Markdown can be detected by
##(single hash could be used for other things) or[link](url)or**bolding**or more.Auto detection will not work always correctly, so there would be still the need for a manual setting.
I still think that a global setting would be fine (it would be definitely better than auto detection without manual correction per note), since people who are familiar with markdown and activate
.mdglobally are still able to fill the files with text only.Btw., do you would deactivate markdown parsing/preview if the file type is not
.md?I guess I’m fine with a setting if you really really think there’s no automatic way to handle this @nextcloud/notes. Of course the default should be .txt (like now)
Btw., do you would deactivate markdown parsing/preview if the file type is not .md?
@korelstar when you use Markdown syntax then it should be properly rendered regardless of the file extension. That’s the whole point of the seamlessness of it. ;) Especially if we introduce that setting with txt by default.
@jancborchardt Why do you think this cannot be a global setting? If someone just writes text in a Markdown document this would work as well, or am I wrong?
@claell yes, it works when writing text in a Markdown document, but not the other way around. If you for some reason decide to set the default to txt then typing markdown would not render it. And that behavior makes little sense, especially as txt is the better default.
@jancborchardt As far as I understand answers to this, .txt is default to not irritate inexperienced users. And in this app rendering also works when writing Markdown in a txt, this is how it is currently done.
If there are experienced users who understand what markdown is, they can set the extension to .md, This only changes the extension, not the behaviour of the app.
Reacted by treuss77 remaining items
I've implemented the requested setting in #223. Please test and give feedback!
Reacted by maiki, Ben Yanke, Robert Korulczyk, Niedermann IT-Dienstleistungen, Elektropepi, sunjam, vittorio-c and Nathan FriedlyReacted by Nathan Friedly- removedhelp wantedComplex issue or we don't know how to fix itComplex issue or we don't know how to fix it
on May 24, 2019 - added 2 commits that reference this issue
on Apr 24, 2020 I've implemented the requested setting in #223. Please test and give feedback!
Hi, Korelstar. I've just installed the Notes app on my Android phone and do not see the setting to create new files as
.md. Could you give me a hint on where to search?@thumos333 this repository is only about the server app. The repository for the Android app is here: https://github.com/stefan-niedermann/nextcloud-notes/issues
Currently the settings can only be changed in the Web UI (at the bottom left), but the next release of th Notes server app will ship an extended API which will allow client apps to change the settings.
For the Android app the work is pretty much done and will be shipped in a future version as soon as it has been tested with the new API, so just be a little bit more patient 🙂For the Android app the work is pretty much done and will be shipped in a future version
That's awesome. Many thanks for the reply. This would be a much needed function. I am glad I've started using NC Notes now when it is about to arrive.
Glad to hear that! I am curious why changing this setting is a much needed function in the Android app for you? How often and why do you switch between
.txtand.md?Keep in mind that you already can change this setting today in the Web UI (which also will be applied to new notes which you create via the Android app).
Glad to hear that! I am curious why changing this setting is a much needed function in the Android app for you?
I work with dozens of notes and make many edits to them every day. Some are 300 kb long, or so. I was very glad to discover that NC Notes can edit notes as
.txtor.mdand save them in folders. (Combined with auto-syncing, a clean design and some other simple but important functions, this is actually a very rare combination among Android note-taking apps.)I never edit on the web but only on my PC and Android. On the PC, I use the Markdown format and Sublime Text as the editor, hence all files are saved as
.md. It's not a huge problem to have some files (those created on Android) as.txtand manually rename their resolution - but still an inconvenience. If the text is a.txt, Sublime may sometimes recognize it asplain text; perhaps there may be some rendering inconveniences when converting into office documents.It's not a huge problem to have some files (those created on Android) as .txt and manually rename their resolution - but still an inconvenience
Again: If you toggle the setting the Web UI of the Notes app (this is already possible since a long time in the bottom left section of the Notes browser app), all further Notes, including the ones you create with the Android app will be stored as
.mdin the future. No need to wait for this setting in the Android app. Just set.mdin the settings section of the Notes app in your browser and it will automatically also affect the Android app.Reacted by glow12121all further Notes, including the ones you create with the Android app will be stored as
.mdin the futureAch so! Many thanks for letting me know!
Reacted by Niedermann IT-Dienstleistungen
I don't know, if this was discussed before, but new files are created with the .txt extension. If you want to edit the files directly in the
Notesfolder with another editor (e.g. icewind1991/files_markdown or on Desktop), the file format is not recognized.