Create a javascript function

En curso Publicado Aug 13, 2014 Pagado a la entrega
En curso Pagado a la entrega

Need a routine written in pure Javascript (please no jquery or other addons).

No reliance on server side processing, all in browser please.

Remove all duplicate and extra tags.

Handle attributes as well as tags.

Adjust an array of character positions after tag removal.

In this text, character position 50 is the H in Hello

Character position 100 is the T in There.

Example of functions usage:

var messyhtmlstring = "<font face='arial'><b><b><font face='times'><i><b>Hello</b></b></i><i><font face='arial'></font><b> There</b></i></font><font face='times'>.<br></font></b></font>"

var posadjust = [ 50, 100 ];

var cleanedhtmlstring = StrHTMLClean(messyhtmlstring, posadjust);

Clean result should be:

"<b><font face='times'><i>Hello There</i>.<br></font></b>"

Adjusted positions should be:

posadjust = [ 25, 31 ]

var posadjust is the position of the text Hello and There.

So that would be needed for each word in the html output.

It must be quick since it's going to be constantly called during editing.

JavaScript

Nº del proyecto: #6316819

Sobre el proyecto

10 propuestas Proyecto remoto Activo Aug 13, 2014

Adjudicado a:

rubytopcoders

Hello, I am expert with Javascript and i am very interesting this project! Hope to work with you! Best regards, LEO

£55 GBP en 3 días
(1 comentario)
2.2

10 freelancers están ofertando un promedio de £127 por este trabajo

sheikhabuzer

I have been working as a Web Developer... I have created differnt websites using HTML5,CSS3,Javascript,Jquery,BootStrap,AngularJS,PHP,Wordpress etc... I can do this quickly... Here are few projects... https://w Más

£23 GBP en 0 días
(76 comentarios)
7.6
samitXI

Hi Sir, I am ready to work for you.I have 9 years of experience in C/C++, python , java, PHP, Javascript and, MySQL. please see some of my works also check my reviews you will get better idea about my skill.I deliver Más

£222 GBP en 5 días
(23 comentarios)
6.2
TrickyWebtech

HI,Me as web expert.I have expertise in javascript and jquery.I understood your requirement and if you allow me then I can work on your project and complete today.

£92 GBP en 0 días
(43 comentarios)
6.1
audelk

im expert in javascript. i can do this without a glitch. ------------------------------------------------------------------------ thank you audel

£66 GBP en 5 días
(22 comentarios)
5.7
lucentinnovation

Greeting from Lucent Innovation...!!! Hello there, I am Javascript dev here. you can hire us with good out put. We can discuss more on this. Many Thanks Nitesh Lucent Innovation

£184 GBP en 3 días
(10 comentarios)
3.7
sujoymondal87

A proposal has not yet been provided

£116 GBP en 2 días
(6 comentarios)
3.2