現在、テーブル内のフォントサイズは各セル内で&sizeで指定しないと変更できませんが、| |cなどの中で、COLOR:やBGCOLOR:のように一括指定できるようにSIZE:もほしい。
参考:official:質問箱
diff -u -r1.41 convert_html.php --- convert_html.php 29 May 2003 09:25:43 -0000 1.41 +++ convert_html.php 1 Jun 2003 14:18:39 -0000 @@ -392,18 +392,23 @@ parent::Block(); $this->style = array(); - while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLOR\(([#\w]+)\)):(.*)$/',$text,$matches)) + while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLOR\(([#\w]+)\)|SIZE\(([\d\w]+)\)):(.*)$/',$text,$matches)) { if ($matches[1]) { $this->style['align'] = 'text-align:'.strtolower($matches[1]).';'; - $text = $matches[4]; + $text = $matches[5]; } else if ($matches[3]) { $name = $matches[2] ? 'background-color' : 'color'; $this->style[$name] = $name.':'.htmlspecialchars($matches[3]).';'; - $text = $matches[4]; + $text = $matches[5]; + } + else if ($matches[4]) + { + $this->style['size'] = 'font-size:'.htmlspecialchars($matches[4]).';'; + $text = $matches[5]; } } if ($is_template) {
- while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLOR\(([#\w]+)\)|SIZE\(([\d\w]+)\)):(.*)$/',$text,$matches)) + while (preg_match('/^(?:(LEFT|CENTER|RIGHT)|(BG)?COLOR\(([#\w]+)\)|SIZE\(([\d]+)\)):(.*)$/',$text,$matches)) { if ($matches[1]) { $this->style['align'] = 'text-align:'.strtolower($matches[1]).';'; $text = $matches[5]; } else if ($matches[3]) { $name = $matches[2] ? 'background-color' : 'color'; $this->style[$name] = $name.':'.htmlspecialchars($matches[3]).';'; $text = $matches[5]; } else if ($matches[4]) { - $this->style['size'] = 'font-size:'.htmlspecialchars($matches[4]).';'; + $this->style['size'] = 'font-size:'.htmlspecialchars($matches[4]).'px;'; $text = $matches[5]; } }