예제 #1
0
 function testTextShouldNotBeRed()
 {
     $converter = new JoshRibakoff_Note_RTFToHTML();
     $converter->setColorTable(array('000000', 'FF0000', 'FFFF00'));
     $output = $converter->convert('\\cf1red\\b\\cf2yellow bold');
     $expected = '<span style="color:#FF0000">red<b></b></span><b><span style="color:#FFFF00">yellow bold</span></b>';
     $this->assertEquals($expected, $output, 'should not be red');
 }
예제 #2
0
파일: Note.php 프로젝트: alipek/rtf
 /** Formats the note represented by this object as HTML */
 function formatHTML()
 {
     $converter = new JoshRibakoff_Note_RTFToHTML();
     $converter->setColorTable($this->colorTable());
     return $converter->convert(trim($this->rtf_text));
 }