DankMaterialShell icon indicating copy to clipboard operation
DankMaterialShell copied to clipboard

Markdown support in Notepad widget

Open Coruscant11 opened this issue 2 months ago • 4 comments

Thanks again for this awesome project.

It would be awesome to have a tiny live markdown rendering while editing text in the notepad widget. Like, rendering titles and links.. this kind of stuff.

No need for Obsidian/Logseq or any other application! Just use direct text editing and save to plain text files!

Wdyt?

Cheers

Coruscant11 avatar Oct 29 '25 23:10 Coruscant11

Although I love the idea, I do not think markdown rendering is the right place given that the notepad widget is more like the windows or mac notepads equivalent. I still think it might be a great plugin.

What I would love and I'd be open to implement (if the maintainers agree) is a markdown syntax highlighting to the notepad widget, similar to text editors.

Image)

We could use chroma library as backend for rendering colors : https://swapoff.org/chroma/playground/

D4ario0 avatar Nov 08 '25 20:11 D4ario0

Although I love the idea, I do not think markdown rendering is the right place given that the notepad widget is more like the windows or mac notepads equivalent. I still think it might be a great plugin.

What I would love and I'd be open to implement (if the maintainers agree) is a markdown syntax highlighting to the notepad widget, similar to text editors.

Image)

We could use chroma library as backend for rendering colors : https://swapoff.org/chroma/playground/

I would love that, personally

bbedward avatar Nov 08 '25 20:11 bbedward

Sure, I was thinking:

  • Add new toggle config to the text editor "notepadEnableMarkdownSyntax":false (default).
  • Swap the PlainTextEditor Widget with a RichTextEditor Widget.
  • Call syntax highlighting function on keydown Event and repaint.

About the dependency... chroma where would you add this highlighting function? In the dank linux repo via ipc ?

D4ario0 avatar Nov 10 '25 17:11 D4ario0

Sure, I was thinking:

  • Add new toggle config to the text editor "notepadEnableMarkdownSyntax":false (default).
  • Swap the PlainTextEditor Widget with a RichTextEditor Widget.
  • Call syntax highlighting function on keydown Event and repaint.

About the dependency... chroma where would you add this highlighting function? In the dank linux repo via ipc ?

Yea that would work the best (avoids extra dependencies) - it might not even need IPC, like over the socket - could just be a CLI dms chroma <some escaped input> . That would be the easiest way.

bbedward avatar Nov 10 '25 17:11 bbedward