| | 43 | |
| | 44 | function getContent( $def_text = '' ) { |
| | 45 | $t = parent::getContent( $def_text ); |
| | 46 | if(!$this->isConflict) { |
| | 47 | return $t; |
| | 48 | } |
| | 49 | $options = new FCKeditorParserOptions(); |
| | 50 | $options->setTidy(true); |
| | 51 | $parser = new FCKeditorParser(); |
| | 52 | $parser->setOutputType(OT_HTML); |
| | 53 | $pa = $parser->parse($t, $this->mTitle, $options); |
| | 54 | return $pa->mText; |
| | 55 | |
| | 56 | } |
| | 57 | |
| | 58 | function getWikiContent(){ |
| | 59 | return $this->mArticle->getContent(); |
| | 60 | } |
| | 61 | |
| | 62 | /** |
| | 63 | * This is a hack to fix |
| | 64 | * http://dev.fckeditor.net/ticket/1174 |
| | 65 | * If RTE is enabled, diff must be performed on WikiText, not on HTML |
| | 66 | */ |
| | 67 | function showDiff() { |
| | 68 | global $wgFCKWikiTextBeforeParse; |
| | 69 | if (isset($wgFCKWikiTextBeforeParse)) { |
| | 70 | $_textbox1 = $this->textbox1; |
| | 71 | $this->textbox1 = $wgFCKWikiTextBeforeParse; |
| | 72 | } |
| | 73 | $result = parent::showDiff(); |
| | 74 | if (isset($wgFCKWikiTextBeforeParse)) { |
| | 75 | $this->textbox1 = $_textbox1; |
| | 76 | } |
| | 77 | } |