Forum closed. New forum available at

Remove non-wanted tags

Support forum for WYMeditor.

Remove non-wanted tags

Postby fesja on Tue Apr 13, 2010 7:46 pm


Where do I have to write the white list of tags that I want? Or where do I have to write the non-wanted xhtml tags? I've tried the following with no luck. When I paste a text, all the tags are still shown.

Thanks a lot!

Code: Select all
    WYMeditor.XhtmlSaxListener.block_tags = ["p", "strong", "em"];
    WYMeditor.XhtmlSaxListener.inline_tags = ["br"];
    WYMeditor.XhtmlSaxListener.avoided_tags = ["a", "abbr", "acronym", "address", "area",
           "base", "bdo", "big", "blockquote", "body", "button",
           "caption", "cite", "code", "col", "colgroup", "dd", "del", "div",
           "dfn", "dl", "dt",  "fieldset", "form", "head", "h1", "h2",
           "h3", "h4", "h5", "h6", "html", "i", "ins",
           "kbd", "label", "legend", "li", "map", "noscript",
           "object", "ol", "optgroup", "option", "param", "pre", "q",
           "samp", "script", "select", "small", "span", "style",
           "sub", "sup", "table", "tbody", "td", "textarea", "tfoot", "th",
           "thead", "title", "tr", "tt", "ul", "var", "extends"];
Posts: 1
Joined: Tue Apr 13, 2010 7:43 pm

Re: Remove non-wanted tags

Postby mr_lundis on Wed Apr 21, 2010 4:48 pm

I'll try to look in to this as soon as I find some free time. If you want to give it a shot yourself, you can always set a breakpoint in the parser code (using firebug for example) and step through it to see what happens/goes wrong. Doing so will probably be faster that waiting around for me to do it for you... ;)

Some good reading on the subject, if you're no to familiar with JS-debugging: ... avascript/

Jonatan Lundin - designer, developer and forum moderator. You should follow me on Twitter!
Posts: 335
Joined: Sun Dec 02, 2007 10:59 am
Location: Sweden

Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests