Hi Yaron,
In the (not so current) SF 2.0.8 we discovered a bug that is caused
when you use the FCKeditor for free text fields and if you have a
default value set for the free text field.
The problem is that the default value must be send to the FCKeditor
parser so that the correct markup for the FCK is generated.
I will attach a patch for 2.0.8 on this mail. If not allready happend
in a recent version can you please consider this fix for the next
release?
The patch might be even optimized because i just copied more or less
whats used to load the current value somewhere near line 1200.
Thank you.
Best regards, Stephan
--
Stephan Robotta
Halo Team
ontoprise GmbH - know how to use Know-how
- - -
Halo Extension - Want to get involved? http://smwforum.ontoprise.com/development
- - -
An der RaumFabrik 29; 76227 Karlsruhe; Germany
Tel.: +49 721 509809-10; Fax: +49 721 509809-11
email: robo...@ontoprise.de, www: http://www.ontoprise.com
Registered Office: Karlsruhe, Germany, HRB 109540
Managing Directors: Prof. Dr. Jürgen Angele, Hans-Peter Schnurr
- - -
--- extensions/SemanticForms/includes/SF_FormPrinter.php (original 2.0.8)
+++ extensions/SemanticForms/includes/SF_FormPrinter.php (patched)
@@ -715,7 +715,16 @@
if ( $cur_value == '' ) {
$default_value = '!free_text!';
} else {
- $default_value = $cur_value;
+ // if the FCKeditor extension is installed, default value
needs to be parsed for use in editor
+ global $wgFCKEditorDir;
+ if ( $wgFCKEditorDir && strpos( $existing_page_content,
'__NORICHEDITOR__' ) === false ) {
+ $showFCKEditor = SFFormUtils::getShowFCKEditor();
+ if ( !$form_submitted && ( $showFCKEditor & RTE_VISIBLE )
) {
+ $default_value = SFFormUtils::prepareTextForFCK(
$cur_value );
+ }
+ else $default_value = $cur_value;
+ }
+ else $default_value = $cur_value;
}
$new_text = SFTextAreaInput::getText( $default_value,
'free_text', false, ( $form_is_disabled || $is_restricted ), $field_args );
if ( in_array( 'edittools', $free_text_components ) ) {
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel