Tweak the TinyMCE settings so that more of the original
whitespace and HTML is preserved when editing help, making
help patches easier to understand.
---
 edithelp.pl                                        |    2 ++
 .../prog/en/modules/help/edithelp.tmpl             |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/edithelp.pl b/edithelp.pl
index 5d236c2..362f678 100755
--- a/edithelp.pl
+++ b/edithelp.pl
@@ -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(
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/help/edithelp.tmpl 
b/koha-tmpl/intranet-tmpl/prog/en/modules/help/edithelp.tmpl
index d74e710..7e893aa 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/help/edithelp.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/help/edithelp.tmpl
@@ -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" -->
-- 
1.5.6.5

_______________________________________________
Koha-patches mailing list
[email protected]
http://lists.koha.org/mailman/listinfo/koha-patches

Reply via email to