htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

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


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


Rodrigo
New User

May 28, 2004, 8:39 PM

Post #1 of 21 (54000 views)
Shortcut
how can i use the word cleaner? Can't Post

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

Post #2 of 21 (53995 views)
Shortcut
Re: [Rodrigo] how can i use the word cleaner? [In reply to] Can't Post

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

Post #3 of 21 (53921 views)
Shortcut
Re: [Luis] how can i use the word cleaner? [In reply to] Can't Post

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

Post #4 of 21 (53918 views)
Shortcut
Re: [Rodrigo] how can i use the word cleaner? [In reply to] Can't Post

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

Post #5 of 21 (53893 views)
Shortcut
Re: [Luis] how can i use the word cleaner? [In reply to] Can't Post

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

Post #6 of 21 (53877 views)
Shortcut
Re: [Luis] how can i use the word cleaner? [In reply to] Can't Post

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

Post #7 of 21 (53865 views)
Shortcut
Re: [xanadu] how can i use the word cleaner? [In reply to] Can't Post

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

Post #8 of 21 (53673 views)
Shortcut
Re: [Luis] how can i use the word cleaner? [In reply to] Can't Post

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

Post #9 of 21 (53591 views)
Shortcut
Re: [jeffd] how can i use the word cleaner? [In reply to] Can't Post

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

Post #10 of 21 (53590 views)
Shortcut
Re: [Thom] how can i use the word cleaner? [In reply to] Can't Post

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

Post #11 of 21 (53578 views)
Shortcut
Re: [Luis] how can i use the word cleaner? [In reply to] Can't Post

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

Post #12 of 21 (53555 views)
Shortcut
Re: [jeffd] how can i use the word cleaner? [In reply to] Can't Post

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

Post #13 of 21 (53546 views)
Shortcut
Re: [Luis] how can i use the word cleaner? [In reply to] Can't Post

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

Post #14 of 21 (53540 views)
Shortcut
Re: [jeffd] how can i use the word cleaner? [In reply to] Can't Post

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

Post #15 of 21 (53487 views)
Shortcut
Re: [Luis] how can i use the word cleaner? [In reply to] Can't Post

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

Post #16 of 21 (53417 views)
Shortcut
Re: [Luis] how can i use the word cleaner? [In reply to] Can't Post

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

Post #17 of 21 (52346 views)
Shortcut
Re: [jorge_esp] how can i use the word cleaner? [In reply to] Can't Post

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

Post #18 of 21 (52337 views)
Shortcut
Re: [garethmoss] how can i use the word cleaner? [In reply to] Can't Post

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

Post #19 of 21 (51642 views)
Shortcut
Re: [Luis] how can i use the word cleaner? [In reply to] Can't Post

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

Post #20 of 21 (50546 views)
Shortcut
Re: [Luis] how can i use the word cleaner? [In reply to] Can't Post

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

Post #21 of 21 (50527 views)
Shortcut
Re: [dimoss] how can i use the word cleaner? [In reply to] Can't Post

Hi Luis,

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

Mark
Attachments: editor.js (46.4 KB)

 
 
 


Search for (options)