Quantcast
Channel: textarea content inside a .txt file but keep line-breaks - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Dyrandz Famador for textarea content inside a .txt file but keep...

you can use replace like this: text = text.replace(/\n/g, "\r\n"); var data = new Blob([text], {type: 'text/plain'}); SEE DEMO

View Article



textarea content inside a .txt file but keep line-breaks

I have some piece of code that saves value of textarea into a local text file. Everything is seems to work fine but I don't want to lose line breaks. Code & fiddle: HTML <textarea...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images