nuttyartist / notes

Fast and beautiful note-taking app written in C++. Write down your thoughts.
https://notes-foss.com
Mozilla Public License 2.0
3.83k stars 339 forks source link

Markdown extended support [15$] #161

Open reyman opened 7 years ago

reyman commented 7 years ago

Hi,

I'm really interested by the future of your project because we really really need a desktop , cross platform notes application which easily open notes files stored in a simple local folder (/home/myname/notes) shared between computers and systems using simple sync method like drive/dropbox/anything else.

Actually i use caret.io to write my notes, a great cross platform desktop markdown editor, but it lacks some useful thing for note taking like : encryption, tag, folders and nested folders, and an easy research toolbar.

I suppose this is planned but markdown (simple then extended) support could be very cool for notes in the future :) So i push a little bounty to help that : https://www.bountysource.com/teams/notes

Perhaps we could imagine a simple toolbar like in Laverna or Standard Notes note application or something even best like ghost ( https://blog.ghost.org/1-0/) or caret.io (https://caret.io/) interface ?

theshadowx commented 7 years ago

Hi, thanks for being interested in Notes.

Concerning Dropbox, there is a way to sync, please refer to this issue #109 .

nuttyartist commented 7 years ago

Thanks, we'll keep that in mind when implementing Markdown in the future.

mlanner commented 6 years ago

+1 for Markdown support.

Waqar144 commented 4 years ago

QMarkdownTextEdit could be used to implement this and # #201 with a few modifications

Waqar144 commented 4 years ago

Just experimented a little:

Here's what it looks like. Full markdown support + syntax highlighting.

Screenshot_20191218_213658

theshadowx commented 4 years ago

@Waqar144 Thanks for the proposal, but I think this should be added later.

Waqar144 commented 4 years ago

Alright. But out of curiosity why later? Are there any problems that can happen due to this?

This is a one line addition to the main code base + a couple of library headers. And potentially a spellcheck feature could be added to it very easily.

nuttyartist commented 4 years ago

Hmm. Can you create a branch where I can test this? What determines the color of the font in the headlines?

Usually, I would say that we need to wait for implementing our future version in order to properly support different styles of text, but I want to try it.

Waqar144 commented 4 years ago

What determines the color of the font in the headlines?

It's hard-coded. But it can be extended to use style schemas or something similar like QOwnNotes does.

Usually, I would say that we need to wait for implementing our future version in order to properly support different styles of text, but I want to try it.

Sure. Though, this change is not related to any other part of the code and wouldn't effect anything. You can write markdown notes even now. Only difference with this change is that it will style them at run time.

You can try it here: #237

The text styles live in markdownhighlighter.cpp -> initTextFormats()

future version

That is true rich text. Markdown is plaintext only. (no proper text alignments and that sort of thing) And yes, you have the ## and backticks and asterisks in the text. It doesn't look ugly, however some users prefer pure text with formatting (like in word processors) and it very hard to do with native tech in markdown. I am working on a way to show kind of a live preivew of markdown in the plaintext but i am not so sure about its success yet.

But you guys are using QTextEdit which has Rich Text support(using HTML I think) and kind of experimental markdown support (Qt 5.14 onwards). Rich text support could be implemented in two ways(with md/html).

I should mention this in advance that QTextEdit's html support is average at best as I have seen some weird bugs in it. So relying on that for rich text may give problems.

nuttyartist commented 4 years ago

Thanks for the information, @Waqar144 . I like your implementation of Markdown in the PR. I commented there.

Regarding rich text, we should discuss it at the suitable issue #201. And yes, we will need to evaluate the best technology we for integrating for rich text. Maybe there are open source projects that have done a good job with that already.

nuttyartist commented 4 years ago

Done with #237. Support for images and footnotes will be in a future release. @Waqar144 you can claim your bounty.

Waqar144 commented 4 years ago

Thanks