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:
Luis Word Cleaner with HTML 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.

 


TNeves
New User

Feb 3, 2005, 7:48 AM

Post #1 of 4 (42427 views)
Shortcut
Luis Word Cleaner with HTML CLeaner Can't Post

 Hi all,

I┤m using the HTMLarea with Luis Word Cleaner in my aplications, but it is not working very well for what I need... When I paste some text that I copied of any site, the editor keeps all the formatting of texts (color, font, size), tables, etc
I would like that the EDITOR one only copied the text with basic formattings (Bold, Italic, Underline, BReak) and images tags.

If somebody will be able to help me will be very grateful!


PS: The code of the EDITOR is attached

PS2: Who to want to see an example: www.labomba.com.br/problema/index.html

THANKS!!!!!
Faša valer a pena

(This post was edited by TNeves on Feb 3, 2005, 7:51 AM)
Attachments: editor.zip (15.2 KB)


Luis
Veteran

Feb 3, 2005, 9:35 AM

Post #2 of 4 (42397 views)
Shortcut
Re: [TNeves] Luis Word Cleaner with HTML CLeaner [In reply to] Can't Post

Hi TNeves:

Take a look at function myclean(editdoc).

The first five lines are supposed to strip those tags at all, the rest only remove the attributes defined in function cleanEmptyTag(oTags).

If you want a tag stripped at all, just change it to the same format of the first five. For example, if you want to remove <H1>, make it:

oTags = editdoc.all.tags("SPAN"); if (oTags != null) {for (var i = oTags.length - 1; i >= 0; i--) {oTags.outerHTML = oTags.innerHTML;}}

Instead of:

oTags = editdoc.all.tags("H1"); if (oTags != null) {for (var i = oTags.length - 1; i >= 0; i--) {cleanEmptyTag(oTags);}}

Greetings



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


TNeves
New User

Feb 3, 2005, 10:16 AM

Post #3 of 4 (42390 views)
Shortcut
Re: [Luis] Luis Word Cleaner with HTML CLeaner [In reply to] Can't Post

Hi Luis,

I tried to make the changes that you said. As I want to remove tags FONT and TABLE (table, td, tr...), I start changing this line:

oTags = editdoc.all.tags("FONT"); if (oTags != null) {for (var i = oTags.length - 1; i >= 0; i--) {oTags.outerHTML = oTags.innerHTML;}}

to this line:

oTags = editdoc.all.tags("FONT"); if (oTags != null) {for (var i = oTags.length - 1; i >= 0; i--) {cleanEmptyTag(oTags);}}

But I did not see no difference in generated code HTML. I only want to preserv this tags when paste a text in the HTMLArea: IMG, B, I, U, A.

The example that I am using to make the tests is in: www.labomba.com.br/problema/index.html

Thanks again..
(Obrigado!!!)
Faša valer a pena

(This post was edited by TNeves on Feb 3, 2005, 10:21 AM)


TNeves
New User

Feb 4, 2005, 4:13 AM

Post #4 of 4 (42347 views)
Shortcut
Re: [TNeves] Luis Word Cleaner with HTML CLeaner [In reply to] Can't Post

Hi Luis (again.. hehehe),

I go to try to explain better what I need with the EDITOR(HTMLarea) to see if you or anybody can help me...
If you to have access link that I passed above (http://www.labomba.com.br/problema/index.html) you it will go to see in the end of the page the EIDTOR and some Smiles, where click in the image it is placed in the EDITOR... I would like it editor so that the people can leave the text while only BOLDFACE, UNDERLINED or ITALIC, and only place LINKS and these smiles.. These smiles cited are only images can be placed. The person cannot place image of other sites. This I control through the ASP (I compare tag of the image, and one will be smile authorized I records in the DB). The remain of tags I would like that I did not shown, therefore many people I copy the text of the Web, and when sending the message it is total dirty... You can see an example practical of that I am speaking in the address: http://www.labomba.com.br/listas/mural_editor_novo.asp?id=142


You will be able to see some "dirty" messages with codes HTML that had come together with the text copied of web

Thanks again!

 
 
 


Search for (options)