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.

Habilidades: JavaScript, HTML

Sobre o Cliente:
( 3 comentários ) Brighton, United Kingdom

ID do Projeto: #34367875

Concedido a:


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 em 1 dia
(14 Comentários)

29 freelancers estão ofertando em média $134 nesse trabalho


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 Mais

$30 USD em 1 dia
(736 Comentários)

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 in 5 dias
(88 Comentários)

* 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 Mais

$250 USD in 12 dias
(54 Comentários)

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 Mais

$160 USD in 4 dias
(94 Comentários)

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 em 1 dia
(69 Comentários)

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 Mais

$250 USD in 7 dias
(20 Comentários)

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 Mais

$200 USD in 7 dias
(28 Comentários)

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? Mais

$140 USD in 7 dias
(12 Comentários)

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 in 7 dias
(8 Comentários)

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 Mais

$100 USD in 7 dias
(5 Comentários)

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 Mais

$100 USD in 7 dias
(7 Comentários)

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 in 7 dias
(13 Comentários)

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 Mais

$250 USD in 2 dias
(6 Comentários)

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 Mais

$200 USD in 3 dias
(5 Comentários)

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 Mais

$50 USD in 7 dias
(11 Comentários)

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 Mais

$130 USD in 3 dias
(5 Comentários)

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 in 7 dias
(9 Comentários)

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 Mais

$100 USD in 7 dias
(3 Comentários)

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 em 1 dia
(4 Comentários)

⭐⭐⭐⭐⭐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 Mais

$100 USD in 2 dias
(1 Comentário)