Javascript expert needed Urgently

Completed Posted 5 years ago Paid on delivery
Completed Paid on delivery

I need the following js script to work with safari and IE. Tested on chrome and Firefox and works well. It looks like safari is not supporting .getRangeAt(0).

The id is a contenteditable div.

----------

<div id="container contenteditable"></div>

----------.

var saveSelection, restoreSelection;

saveSelection = function(containerEl) {

var range = [login to view URL]().getRangeAt(0);

var preSelectionRange = [login to view URL]();

[login to view URL](containerEl);

[login to view URL]([login to view URL], [login to view URL]);

var start = [login to view URL]().length;

return {

start: start,

end: start + [login to view URL]().length

}

}

restoreSelection = function(containerEl, savedSel) {

var charIndex = 0, range = [login to view URL]();

[login to view URL](containerEl, 0);

[login to view URL](true);

var nodeStack = [containerEl], node, foundStart = false, stop = false;

while (!stop && (node = [login to view URL]())) {

if ([login to view URL] == 3) {

var nextCharIndex = charIndex + [login to view URL];

if (!foundStart && [login to view URL] >= charIndex && [login to view URL] <= nextCharIndex) {

[login to view URL](node, [login to view URL] - charIndex);

foundStart = true;

}

if (foundStart && [login to view URL] >= charIndex && [login to view URL] <= nextCharIndex) {

[login to view URL](node, [login to view URL] - charIndex);

stop = true;

}

charIndex = nextCharIndex;

} else {

var i = [login to view URL];

while (i--) {

[login to view URL]([login to view URL][i]);

}

}

}

var sel = [login to view URL]();

[login to view URL]();

[login to view URL](range);

}

var savedSelection;

savedSelection = saveSelection( [login to view URL]("container") );

restoreSelection([login to view URL]("container"), savedSelection);

function getselected(){

return [login to view URL]().getRangeAt(0);

}

AJAX HTML HTML5 JavaScript jQuery / Prototype

Project ID: #19385802

About the project

4 proposals Remote project Active 5 years ago

Awarded to:

anatolygenay123

Hi, How are you? Greetings from Yoshida in Japan! ⭐24hours communication, if you need, I can work as full time⭐ I’ve carefully gone through your job post. I feel very confident on your project and You will get the "B More

$25 USD in 1 day
(59 Reviews)
7.0

4 freelancers are bidding on average $49 for this job

GetReal

Hi, Let me help you with javascript, I have vast experience, ready to start and look forward to work with you..thanks!

$35 USD in 0 days
(485 Reviews)
7.7
fattahaabdul

will help you. I have 8+ years of experience in JavaScript. I assure you i will give 100% quality work. I am online. Let us discuss to proceed further

$111 USD in 1 day
(166 Reviews)
8.0