Home: htmlArea 2: htmlArea 2 & 3 archive (read only): htmlArea v2.0 - Add-Ons:
how can i use the word cleaner?



Rodrigo
New User

May 28, 2004, 8:39 PM


Views: 53961
how can i use the word cleaner?

Hi, i need to use word cleaner function so i can paste from word documents but i dont know where to get the source files from and how to put them in my own editor, help will be much apreciated, thanks in advance


Luis
Veteran

May 28, 2004, 11:33 PM


Views: 53956
Re: [Rodrigo] how can i use the word cleaner?

Hi Rodrigo:

Attach your editor and I'll gladly do it for you.

Greetings


Don't give up!!
http://webstationone.com/test/htmlarea


Rodrigo
New User

May 31, 2004, 7:05 PM


Views: 53882
Re: [Luis] how can i use the word cleaner?

heres my editor, do you need anything else?

thanks in advance
Attachments: editor.js (47.0 KB)


Luis
Veteran

Jun 1, 2004, 12:23 AM


Views: 53879
Re: [Rodrigo] how can i use the word cleaner?

Here you go!

Greetings


Don't give up!!
http://webstationone.com/test/htmlarea
Attachments: editor_rodrigo.js (63.6 KB)


jeffd
Novice

Jun 1, 2004, 4:14 PM


Views: 53854
Re: [Luis] how can i use the word cleaner?

can you set mine up for me? i have tried, but keep getting all sorts of errors. it's attached.
Attachments: editor-mine.js (46.4 KB)


xanadu
New User

Jun 1, 2004, 4:38 PM


Views: 53838
Re: [Luis] how can i use the word cleaner?

I love the word cleaner, but am having a few problems...

I took the new editor.js that you posted and did a diff on my current editor.js and applied the changes. This first problem I ran into was that I am using IE 5.5 and "removeNamedItem" is not a valid function. I got around this with a bit of vodoo.

The next problem that I had was a bit of a phantom bug. I found that sometimes when I pasted in Word Text an "unknown runtime error" would occur. It would point to the line where the SPAN tag is found and removed (by rewriting outerHTML). However, I found that I could replicate the problem by creating a new document with 1 space, then hilighing that space, and pasting. The text will paste in, but the search/replace fails for some reason. I tried to debug, but couldn't find anything different. Any suggestions?


xanadu
New User

Jun 2, 2004, 10:09 AM


Views: 53826
Re: [xanadu] how can i use the word cleaner?

Ok, I did some more research, and I found that my errors would occur if the innerHTML started with ASCII 13 (carriage return). I found that I could replace the "return", but I could not edit/update outer or inner HTML.

BTW, I am running ie 5.5


Thom
New User

Jun 11, 2004, 6:44 PM


Views: 53634
Re: [Luis] how can i use the word cleaner?

Luis,

Hi there. I couldn't find anywhere if you specified that the word cleaner works for any version of htmlarea, or just your modded version. If it works with the standard version, I'd appreciate if you could install it into my editor file (attached). Thanks.



- Thom
Attachments: editor.js (46.8 KB)


Luis
Veteran

Jun 16, 2004, 2:39 AM


Views: 53552
Re: [jeffd] how can i use the word cleaner?

Hi jefd:

Sorry for the delay. Here you go!


Don't give up!!
http://webstationone.com/test/htmlarea
Attachments: editor-mine.js (62.9 KB)


Luis
Veteran

Jun 16, 2004, 2:49 AM


Views: 53551
Re: [Thom] how can i use the word cleaner?

Hi Thom:

Sorry for the delay. Here you go!

Greetings


Don't give up!!
http://webstationone.com/test/htmlarea
Attachments: editor_thom.js (63.9 KB)


jeffd
Novice

Jun 16, 2004, 1:30 PM


Views: 53539
Re: [Luis] how can i use the word cleaner?

it doesn't give me errors now, which is cool. however, it doesn't seem to work either. do i need to add a toolbar button or something? i'm confused.

are there instructions for this somewhere?

-Jeff


Luis
Veteran

Jun 16, 2004, 10:28 PM


Views: 53516
Re: [jeffd] how can i use the word cleaner?

You don't need to do anything. It performs the cleaning code routines onpaste. What do you mean with -it doesn't seem to work? I just tested it again and it works perfectly.

Let me know if you managed to have it working or post me back with some more details on how it is not working as you expect.

Greetings


Don't give up!!
http://webstationone.com/test/htmlarea


jeffd
Novice

Jun 17, 2004, 9:13 AM


Views: 53507
Re: [Luis] how can i use the word cleaner?

So it works on paste? How do you know it's done anything? I was expecting a Word clean up button, or at least a pop-up saying that something had been done.

Maybe I'm confused as to how it works. I thought it would clean out all the Word mark-up. Is that not right? Even on paste, when I review the HTML, it still shows all that HTML. In addition, there are multiple empty cells.

Does it not strip out the HTML?

-Jeff


Luis
Veteran

Jun 17, 2004, 11:08 AM


Views: 53501
Re: [jeffd] how can i use the word cleaner?

No. It doesn't strip out the HTML. What it does is to clean up all the garbage code that MS Word creates when copying and pasting from Word.

What you where expecting is it to convert to plain-text. There is another mod. to get plain-text, which I've posted in multiple ocassions in different variants.

Both can be used with a button or on paste. Take a look in the forum for the other mod. It's pretty easy to install.


Don't give up!!
http://webstationone.com/test/htmlarea


jeffd
Novice

Jun 18, 2004, 2:02 PM


Views: 53448
Re: [Luis] how can i use the word cleaner?

Thanks, Luis. You've been a great help.

I think I have most of this working now except the image insert. I tried rolling my own pop up, because I don't have PHP on this server, but I can't seem to figure out why the image won't insert into the textarea when I try to run it.

My javascript looks like this:
window.opener.formname.textareaname.value += imgtag;

works with any form tag but the htmlArea one. Odd.

-Jeff


jorge_esp
New User

Jun 21, 2004, 4:50 PM


Views: 53378
Re: [Luis] how can i use the word cleaner?

Hi, Luis, could you please check if My editor.js is ok, I think the word cleaner is not working fine, could you please take a look, also I would like to see if is possible when somebody paste something frome anywhere replace te font and put it Arial as default.



I really will aprecita if you can helpme, thanks in advance



here is my editor.js
Attachments: editor.js (124 KB)


garethmoss
New User

Aug 6, 2004, 5:32 AM


Views: 52307
Re: [jorge_esp] how can i use the word cleaner?

Hi,

So the cleaner works, but it takes out too much, it doesn't retain any paragraph breaks. Does anyone else have this problem?

Thanks

Gareth


Luis
Veteran

Aug 6, 2004, 8:47 PM


Views: 52298
Re: [garethmoss] how can i use the word cleaner?

Hi garethmoos:

The cleaner takes out what I wanted it to take out. You can customize it for your needs by modifying function cleanHTLM(unclean).

Closing <p> are being stripped because they are not necessary in HTML, so it's not a problem. If what you need is it to generate XHTML, stay tuned. It's still in beta test.

Greetings


Don't give up!!
http://webstationone.com/test/htmlarea


lars69
Novice

Sep 15, 2004, 3:35 AM


Views: 51603
Re: [Luis] how can i use the word cleaner?

hi luis,

i tried to add your cleanup code to my existing editor but it doesnt seem to work. could you perhaps check what i did wrong ?

thanx.
Attachments: editor.js (62.5 KB)


dimoss
New User

Feb 2, 2005, 3:13 AM


Views: 50507
Re: [Luis] how can i use the word cleaner?

As I am total newby here but I use a previous customised editor I would be grateful if someone integrate the Word Cleaner into my editor (...maybe LuisBlush). I attach my editor below.
Many thanks..


(This post was edited by dimoss on Feb 2, 2005, 3:27 AM)
Attachments: editor_dimoss.js (88.8 KB)


bootlicker
Novice

Feb 2, 2005, 9:23 AM


Views: 50488
Re: [dimoss] how can i use the word cleaner?

Hi Luis,

Can you add me to your list? My editor.js is attached. Thanks a million!!

Mark
Attachments: editor.js (46.4 KB)