Forum closed. New forum available at http://community.wymeditor.org/

Adding an Element to the Parser

Support forum for WYMeditor.

Adding an Element to the Parser

Postby b3n on Tue Jun 30, 2009 10:49 am

Okay, I want to add <iframe> to the parser so it isn't stripped out (XHTML compliancy is unimportant) and I appear to have done everything required, but I am still unable to save an iframe in my content... Any pointers on how this can be done? I'm not the greatest when it comes to Javascript, but I can follow instructions pretty well :)

Just to clarify, inside the XhtmlSaxListener parser function I have changed the block_tags array to the following:
Code: Select all
["a", "abbr", "acronym", "address", "area", "b",
    "base", "bdo", "big", "blockquote", "body", "button",
    "caption", "cite", "code", "col", "colgroup", "dd", "del", "div",
    "dfn", "dl", "dt", "em", "fieldset", "form", "head", "h1", "h2",
    "h3", "h4", "h5", "h6", "html", "i", "iframe", "ins",
    "kbd", "label", "legend", "li", "map", "noscript",
    "object", "ol", "optgroup", "option", "p", "param", "pre", "q",
    "samp", "script", "select", "small", "span", "strong", "style",
    "sub", "sup", "table", "tbody", "td", "textarea", "tfoot", "th",
    "thead", "title", "tr", "tt", "ul", "var", "extends"];


And then in the XhtmlValidator function I have added the following to the _tags array:
Code: Select all
"iframe":
   {
     "attributes":[
     "class",
     "frameborder",
     "height",
     "id",
     "longdesc",
     "marginheight",
     "marginwidth",
     "name",
     "scrolling",
     "src",
     "style",
     "title",
     "width"
     ],
      "required":[
      "src"
      ]
   },


Am I missing anything?

Many thanks
b3n
 
Posts: 3
Joined: Thu Jun 25, 2009 9:06 am
Location: UK

Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests