Completed

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.

Skills: JavaScript, HTML

About the Client:
( 3 reviews ) Brighton, United Kingdom

Project ID: #34367875

Awarded to:

smartarray

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 in 1 day
(14 Reviews)
5.4

29 freelancers are bidding on average $134 for this job

TakeReal

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 More

$30 USD in 1 day
(736 Reviews)
7.6
rukshanlancer

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 days
(88 Reviews)
7.3
Rekhathakur

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

$250 USD in 12 days
(54 Reviews)
6.6
amiitkumar19

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 More

$160 USD in 4 days
(94 Reviews)
6.4
Sv3nie

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 in 1 day
(69 Reviews)
6.0
AlikAgaian

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 More

$250 USD in 7 days
(20 Reviews)
5.6
ahmedaaalnaasan

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 More

$200 USD in 7 days
(28 Reviews)
6.3
carina0530

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

$140 USD in 7 days
(12 Reviews)
5.5
davydenkodev

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 days
(8 Reviews)
4.6
stefanandjelkov1

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 More

$100 USD in 7 days
(5 Reviews)
4.3
sergeymit

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 More

$100 USD in 7 days
(7 Reviews)
4.4
mandionisio154

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 days
(13 Reviews)
4.7
Jarretdev

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 More

$250 USD in 2 days
(6 Reviews)
4.0
jeremytay

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 More

$200 USD in 3 days
(5 Reviews)
3.4
jokicmarijan3

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 More

$50 USD in 7 days
(11 Reviews)
3.2
ayesharifatmed

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 More

$130 USD in 3 days
(5 Reviews)
3.3
oleksandrromanc2

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 days
(9 Reviews)
3.3
anatoliihc

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 More

$100 USD in 7 days
(3 Reviews)
2.7
podobrynin

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 in 1 day
(4 Reviews)
2.7
romanenkovanton

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

$100 USD in 2 days
(1 Review)
2.1