Modification of JS code to make TEXTAREA handle CRLF line ends correctly

I have an embedded system which has a file system, and a facility for editing a text file in that file system. See screenshot.

When the Edit button is clicked, the system transmits a header and the attached JS script to the browser (chrome, firefox, edge, safari) and this opens a textarea.

Then you do edits as required and click Save.

All this works fine, but textarea has an undesirable property: it removes CR (0x0d) characters. Currently each line of the file being edited ends with a CRLF, so the textarea makes into just LF (0x0a).

I need the JS script (see zipfile) modified so that every line ends with a CRLF, before it is sent back.

Blank lines are allowed (a blank line is CRLF only by itself).

There are no style sheets involved, no CSS, no PHP. Just HTML and JS.

I also do not want a lot of JS. There are various editors out there (JS wrappers around a textarea) and these are huge.

Please do not respond unless you have specific experience in this work.

Kemahiran: JavaScript, HTML

Tentang Klien:
( 3 ulasan ) Brighton, United Kingdom

ID Projek: #34367875

Dianugerahkan kepada:


Should this not be a simple 'replaceAll("\n", "\r\n") on the "fileData" variable that you use for reading the textarea value and sending it as part of the PUT request for the response?

$39 USD dalam sehari
(14 Ulasan)

29 pekerja bebas membida secara purata $134 untuk pekerjaan ini


Hello, My name is Sergey. I have try your script, I can load file into text area. But 404 error when I try to save file. I can fix CRLF for $30, but I need access to your server, where your script working and can sav Lagi

$30 USD dalam sehari
(736 Ulasan)

Hey, Peter H. I am intersting in your project. I have skill sets such as HTML and JavaScript. I can start to work on your project right now. when you are available, ping me, please Thank you

$150 USD dalam 5 hari
(88 Ulasan)

* RELIABLE FULL STACK DEVELOPER AND AVAILABLE TO DISCUSS MORE DETAILS IN MEETING ON FREELANCER * Greetings of the day! I have full time and required skills to carry out your project with high quality in time. I wil Lagi

$250 USD dalam 12 hari
(54 Ulasan)

Dear Client, Greetings!! I read your job very carefully and I understand you need an expert “WEB DEVELOPER & DESIGNER” . I am a professional “WEB DEVELOPER & DESIGNER” and also have a 9 years of experience in Web Devel Lagi

$160 USD dalam 4 hari
(94 Ulasan)

Hi, I have this fixed and make it work as suposed within 1 day max. I am an expert in javascript Contact me for more info

$50 USD dalam sehari
(69 Ulasan)

Hi, there. My name is Alik and as you can see my profile, I am a tailent developer. I read your description carefully and I analyzed your requirements. As a excellent developer, I’ve been working for 10 years perfect Lagi

$250 USD dalam 7 hari
(20 Ulasan)

Hello, my name is Ahmed I live in Turkey. I am a bilingual of English and Arabic, I have many experiences with an exquisite teamwork specializing in Website and Application. I read your project ' Modification of JS cod Lagi

$200 USD dalam 7 hari
(28 Ulasan)

Hello, I'm fullstack expert, with over 13 years experience dealing with web, I can help modify your system. I've previously worked on the exact similar project for another employer. When do you need this finished by? Lagi

$140 USD dalam 7 hari
(12 Ulasan)

I read your requirement carefully so I noticed the problem that you want to fix is difference about enter line on windows and linux. I have confidence to give you satisfy result. looking for your response.

$200 USD dalam 7 hari
(8 Ulasan)

Hire me to save your time and money and achieve perfect results. Hi, How are you? I have read your requirement. I have 5 years of software development experience and I have deep knowledge about web development and desi Lagi

$100 USD dalam 7 hari
(5 Ulasan)

Hello, How are you ? I'm glad to have a chance that can bid your project. I've read your requirement carefully and I'm sure that I can complete your project perfectly in time. I'm an expert with web development includ Lagi

$100 USD dalam 7 hari
(7 Ulasan)

Hi, I have many experiences in the projects like this. I will do my best to help you. if available, message me please. thanks!

$200 USD dalam 7 hari
(13 Ulasan)

Hello! Nice to meet you! I will summarize all lectures and provide quality notes. I have read your requirements carefully. I am a Javascript expert and have 5 years of experience. My clients who have worked with me wan Lagi

$250 USD dalam 2 hari
(6 Ulasan)

Hello! I will give you perfect result. After thoroughly reading your description I have clearly understood what you actually need. I am well versed in Javascript and HTML. I consider your project DOABLE as it is withi Lagi

$200 USD dalam 3 hari
(5 Ulasan)

Dear client! I read your requirment and was interested in your project. And I saw your [login to view URL] file and I can do your proejct perfectly as you want. I am web develoepr and have strong experiences in html and javas Lagi

$50 USD dalam 7 hari
(11 Ulasan)

Hello There! This is Ayesha Siddiqua. Nice to meet with you. I am an M.B.B.S doctor. I have completed my graduation from North Bengal Medical College under Rajshahi University. A versatile and professional Web & Mob Lagi

$130 USD dalam 3 hari
(5 Ulasan)

Dear, hiring manager. I am pretty sure I can give you great satisfaction. I can start working right away if you 'd like me to get started. I will do my best and looking forward to working for you. Thanks.

$150 USD dalam 7 hari
(9 Ulasan)

Greetings, I've thought about your job carefully . It feels like it is meant for me. I have solid knowledge about JavaScript programming. I guarantee that you will get more than you've expected. Please don't hesitat Lagi

$100 USD dalam 7 hari
(3 Ulasan)

Hello, the task is clear, you can proceed. The work will take no more than one hour. I have been learning php since school and have been practicing for over 10 years.

$100 USD dalam sehari
(4 Ulasan)

⭐⭐⭐⭐⭐Hello. How are you? ✔️As a full-stack developer, I have extensive experience in JavaScript. I can start ?right now and will deliver ?the perfect result you need. Please send a message to discuss more. Looking Lagi

$100 USD dalam 2 hari
(1 Ulasan)