HTMLPurifier/HTMLModule/Tables.php Quellcode

Tables.php
gehe zur Dokumentation dieser Datei
1 <?php
2 
7 {
11  public $name = 'Tables';
12 
16  public function setup($config)
17  {
18  $this->addElement('caption', false, 'Inline', 'Common');
19 
20  $this->addElement(
21  'table',
22  'Block',
24  'Common',
25  array(
26  'border' => 'Pixels',
27  'cellpadding' => 'Length',
28  'cellspacing' => 'Length',
29  'frame' => 'Enum#void,above,below,hsides,lhs,rhs,vsides,box,border',
30  'rules' => 'Enum#none,groups,rows,cols,all',
31  'summary' => 'Text',
32  'width' => 'Length'
33  )
34  );
35 
36  // common attributes
37  $cell_align = array(
38  'align' => 'Enum#left,center,right,justify,char',
39  'charoff' => 'Length',
40  'valign' => 'Enum#top,middle,bottom,baseline',
41  );
42 
43  $cell_t = array_merge(
44  array(
45  'abbr' => 'Text',
46  'colspan' => 'Number',
47  'rowspan' => 'Number',
48  // Apparently, as of HTML5 this attribute only applies
49  // to 'th' elements.
50  'scope' => 'Enum#row,col,rowgroup,colgroup',
51  ),
52  $cell_align
53  );
54  $this->addElement('td', false, 'Flow', 'Common', $cell_t);
55  $this->addElement('th', false, 'Flow', 'Common', $cell_t);
56 
57  $this->addElement('tr', false, 'Required: td | th', 'Common', $cell_align);
58 
59  $cell_col = array_merge(
60  array(
61  'span' => 'Number',
62  'width' => 'MultiLength',
63  ),
64  $cell_align
65  );
66  $this->addElement('col', false, 'Empty', 'Common', $cell_col);
67  $this->addElement('colgroup', false, 'Optional: col', 'Common', $cell_col);
68 
69  $this->addElement('tbody', false, 'Required: tr', 'Common', $cell_align);
70  $this->addElement('thead', false, 'Required: tr', 'Common', $cell_align);
71  $this->addElement('tfoot', false, 'Required: tr', 'Common', $cell_align);
72  }
73 }
74 
75 // vim: et sw=4 sts=4




Korrekturen, Hinweise und Ergänzungen

Bitte scheuen Sie sich nicht und melden Sie, was auf dieser Seite sachlich falsch oder irreführend ist, was ergänzt werden sollte, was fehlt usw. Dazu bitte oben aus dem Menü Seite den Eintrag Support Forum wählen. Es ist eine kostenlose Anmeldung erforderlich, um Anmerkungen zu posten. Unpassende Postings, Spam usw. werden kommentarlos entfernt.