Class: TextElements::Paragraph
- Inherits:
-
ContainerElement
- Object
- ContainerElement
- TextElements::Paragraph
- Defined in:
- lib/reparcs/elements/text_elements.rb
Overview
A paragraph element ‘<p></p>’ Use: Define a new paragraph.
Instance Method Summary collapse
-
#initialize(attrs = {}) ⇒ Paragraph
constructor
Create a new Paragraph element, takes a optional hash of attributes as parameter.
Constructor Details
#initialize(attrs = {}) ⇒ Paragraph
Create a new Paragraph element, takes a optional hash of attributes as parameter.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/reparcs/elements/text_elements.rb', line 275 def initialize(attrs={}) aattrs = [ "class", "id", "title", "dir", "xml:lang", "onclick", "ondblclick", "onkeydown", "onkeypress", "onkeyup", "onmousedown", "onmousemove", "onmouseout", "onmouseover", "onmouseup" ] childs = [ "a", "abbr", "acronym", "b", "bdo", "big", "br", "button", "cite", "code", "del", "dfn", "em", "i", "img", "input", "ins", "kbd", "label", "map", "object", "q", "samp", "script", "select", "small", "span", "strong", "sub", "sup", "textarea", "tt", "var" ] super("p", aattrs, childs, attrs) @start_element = "<p" @end_element = "</p>" end |