bug 3272: preserve formatting when editing help
authorGalen Charlton <galen.charlton@liblime.com>
Fri, 29 May 2009 13:37:14 +0000 (08:37 -0500)
committerGalen Charlton <galen.charlton@liblime.com>
Fri, 29 May 2009 13:38:44 +0000 (08:38 -0500)
Tweak the TinyMCE settings so that more of the original
whitespace and HTML is preserved when editing help, making
help patches easier to understand.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
edithelp.pl
koha-tmpl/intranet-tmpl/prog/en/modules/help/edithelp.tmpl

index 5d236c2..362f678 100755 (executable)
@@ -34,6 +34,8 @@ my $type    = $input->param('type');
 my $referer = $input->param('referer');
 my $oldreferer = $referer;
 my $help    = $input->param('help');
+# strip any DOS-newlines that TinyMCE may have sneaked in
+$help =~ s/\r//g;
 my $error;
 
 my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
index d74e710..7e893aa 100644 (file)
@@ -16,6 +16,7 @@ tinyMCE.init({
        theme_advanced_path_location : "bottom",
        plugin_insertdate_dateFormat : "%Y-%m-%d",
        plugin_insertdate_timeFormat : "%H:%M:%S",
+    apply_source_formatting : true
 });
 </script>
 <!-- TMPL_IF name="intranetstylesheet" -->