Class: EditElements::Inserted

Inherits:
ContainerElement
  • Object
show all
Defined in:
lib/reparcs/elements/edit_elements.rb

Overview

An inserted element ‘<ins></ins>’

Instance Method Summary collapse

Constructor Details

#initialize(attrs = {}) ⇒ Inserted

Creates a new Inserted element, takes an optional hash of attributes as parameter.



36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/reparcs/elements/edit_elements.rb', line 36

def initialize(attrs={})
  aattrs = [
    "class", "id", "title", "xml;lang",
    "onclick", "ondblclick", "onkeydown", "onkeypress",
    "onkeyup", "onmousedown", "onmousemove", "onmouseout",
    "onmouseover", "onmouseup", "cite", "datetime"
  ]
  childs = [
    "a", "abbr", "acronym", "address", "b", "bdo", "big",
    "blockquote", "br", "button", "cite", "code", "del",
    "dfn", "div", "dl", "em", "i", "img", "input", "ins",
    "kbd", "label", "map", "noscript", "object", "ol", "p",
    "pre", "q", "samp", "script", "select", "small", "span",
    "strong", "sub", "sup", "textarea", "tt", "ul", "var"
  ]
  super("ins", aattrs, childs, attrs)
  @start_element = "<ins"
  @end_element = "</ins>"
end