Index: trunk/extensions/SemanticForms/includes/SF_FormPrinter.php |
— | — | @@ -365,9 +365,9 @@ |
366 | 366 | // } |
367 | 367 | // Otherwise, parse it. |
368 | 368 | // if ( ! $got_form_def_from_cache ) { |
369 | | - $form_def = $wgParser->recursiveTagParse( $form_def ); |
| 369 | + $form_def = $wgParser->recursiveTagParse( $form_def ); |
370 | 370 | $form_def = $wgParser->mStripState->unstripBoth( $form_def ); |
371 | | - $form_def = $wgParser -> doBlockLevels( $form_def, true ); |
| 371 | + $form_def = $wgParser->doBlockLevels( $form_def, true ); |
372 | 372 | wfRunHooks( 'ParserAfterTidy', array( &$wgParser, &$form_def ) ); |
373 | 373 | // } else { |
374 | 374 | // $form_def = $wgParser->parse( $form_def, $this->mPageTitle, $wgParser->mOptions )->getText(); |
— | — | @@ -680,7 +680,7 @@ |
681 | 681 | if ( $sub_components[0] == 'input type' ) { |
682 | 682 | $input_type = $sub_components[1]; |
683 | 683 | } elseif ( $sub_components[0] == 'default' ) { |
684 | | - $default_value = $wgParser -> recursiveTagParse( $sub_components[1] ); |
| 684 | + $default_value = $wgParser->recursiveTagParse( $sub_components[1] ); |
685 | 685 | } elseif ( $sub_components[0] == 'preload' ) { |
686 | 686 | // free text field has special handling |
687 | 687 | if ( $field_name == 'free text' || $field_name == '<freetext>' ) { |
— | — | @@ -836,6 +836,16 @@ |
837 | 837 | $default_value = '!free_text!'; |
838 | 838 | } else { |
839 | 839 | $default_value = $cur_value; |
| 840 | + // If the FCKeditor extension is installed and |
| 841 | + // active, the default value needs to be parsed |
| 842 | + // for use in the editor. |
| 843 | + global $wgFCKEditorDir; |
| 844 | + if ( $wgFCKEditorDir && strpos( $existing_page_content, '__NORICHEDITOR__' ) === false ) { |
| 845 | + $showFCKEditor = SFFormUtils::getShowFCKEditor(); |
| 846 | + if ( !$form_submitted && ( $showFCKEditor & RTE_VISIBLE ) ) { |
| 847 | + $default_value = SFFormUtils::prepareTextForFCK( $cur_value ); |
| 848 | + } |
| 849 | + } |
840 | 850 | } |
841 | 851 | $new_text = SFTextAreaInput::getHTML( $default_value, 'free_text', false, ( $form_is_disabled || $is_restricted ), $field_args ); |
842 | 852 | if ( in_array( 'edittools', $free_text_components ) ) { |