LostRhapsody / slothtime

Minimalist time tracking website
https://slothtime.dev
GNU General Public License v3.0
0 stars 0 forks source link

Re-integrate markdown - marked.js #48

Open LostRhapsody opened 1 year ago

LostRhapsody commented 1 year ago

We previously had markdown for badges. This isn't really required anymore, but for the upcoming notes page, markdown would be a fantastic upgrade to the Notes section. Either a real-time render or an edit/save/render system.

Real-time would of course be slower, and I have an emphasis on being efficient where possible, so I like this less unless there is a method to read in the input, check for any relevant markdown syntax, and then only render when it's there. Also, having to re-render every time the user types would be annoying. If we could type in real-time without having to re-render unless new markdown is added, that would be the best.

The docs recommend cleaning your DOM and input before accepting markdown as input, so setup DOMPurify first.

https://marked.js.org/%5C

LostRhapsody commented 1 year ago

Blocked by https://github.com/LostRhapsody/slothtime/issues/47.