realdennis / md2pdf

Offline markdown to pdf, choose -> edit -> transform 🥂

Home Page:https://md2pdf.netlify.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lack of client-side caching

KasparasMasiukas opened this issue · comments

I was using md2pdf as a Markdown editor today and I forgot to back-up my work. Clicking on a link by accident resulted in a loss of progress. Would it be possible to add client-side caching to the app so that if a user goes out and comes back to md2pdf, the last-cached content is restored?

@Kasparas42180

Hi, I feel so sorry to hear about this, actually I use md2pdf only for file preview and do some little change before covert ...

I thought cache or localstorage might be good in this case, but I am a little afraid that if we add more feature of editor, it might make user lose their focus of file covert.

The other solution is that make a dialog before user refresh or leave the page using beforeunload event.

Hi @realdennis,

I think the alert dialog before page refresh or leave is a great idea! Could you add that instead? Thanks.

@Kasparas42180 It's updated, you could check this feature on md2pdf, if it works as expected please close issue, thank you!

It works perfectly, thanks again!