Skip to content

Add setting to create new files with markdown file extension (.md) #24

Description

@eppfel

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 Notes folder with another editor (e.g. icewind1991/files_markdown or on Desktop), the file format is not recognized.

Activity

  1. Henni commented on Dec 10, 2016

    @Henni
    Member

    Should we introduce a setting for this? I think defaulting it to .md might 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?

  2. korelstar commented on Dec 10, 2016

    @korelstar
    Member

    I vote definitely for a setting for this. .md is too nerdy to be the default. 😎

  3. 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
  4. phsc84 commented on Dec 10, 2016

    @phsc84

    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.

    1. 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'!".
    2. 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."
  5. jancborchardt commented on Dec 15, 2016

    @jancborchardt
    Member

    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.

  6. eppfel commented on Dec 15, 2016

    @eppfel
    MemberAuthor

    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 .md really manually edit their notes with a text editor or would they have another notes app for mobile/desktop?

  7. jancborchardt commented on Dec 16, 2016

    @jancborchardt
    Member

    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.

  8. korelstar commented on Dec 17, 2016

    @korelstar
    Member

    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 .md globally 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?

  9. jancborchardt commented on Dec 17, 2016

    @jancborchardt
    Member

    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.

  10. claell commented on Jan 22, 2017

    @claell

    @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?

  11. jancborchardt commented on Jan 23, 2017

    @jancborchardt
    Member

    @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.

  12. claell commented on Jan 24, 2017

    @claell

    @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.

  13. 77 remaining items

  14. korelstar commented on Jul 5, 2018

    @korelstar
    Member

    I've implemented the requested setting in #223. Please test and give feedback!

  15. modified the milestones: , 2.4.0 on Aug 2, 2018
  16. added 2 commits that reference this issue on Apr 24, 2020
  17. glow12121 commented on May 20, 2021

    @glow12121

    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?

  18. stefan-niedermann commented on May 20, 2021

    @stefan-niedermann
    Member

    @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 🙂

  19. glow12121 commented on May 20, 2021

    @glow12121

    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.

  20. stefan-niedermann commented on May 20, 2021

    @stefan-niedermann
    Member

    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 .txt and .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).

  21. glow12121 commented on May 20, 2021

    @glow12121

    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 .txt or .md and 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 .txt and manually rename their resolution - but still an inconvenience. If the text is a .txt, Sublime may sometimes recognize it as plain text; perhaps there may be some rendering inconveniences when converting into office documents.

  22. stefan-niedermann commented on May 20, 2021

    @stefan-niedermann
    Member

    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 .md in the future. No need to wait for this setting in the Android app. Just set .md in the settings section of the Notes app in your browser and it will automatically also affect the Android app.

  23. glow12121 commented on May 20, 2021

    @glow12121

    all further Notes, including the ones you create with the Android app will be stored as .md in the future

    Ach so! Many thanks for letting me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions