Bug 24455: Add JS functions to format date and datetime strings
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / wysiwyg-systempreferences.inc
1 [% USE raw %]
2 [% USE Asset %]
3 [% #Enable tinymce for system preferences %]
4 [% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %]
5 [% INCLUDE 'str/tinymce_i18n.inc' %]
6
7 <script>
8     // Save TinyMCE content and trigger an event on the original element
9     function wysiwyg_change (ed){
10         ed.save();
11         var original_textarea = ed.getElement();
12         $(original_textarea).trigger("input");
13     }
14
15     tinyMCE.init({
16         branding : false,
17         content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css",
18         editor_selector : "mce",
19         menubar : "file edit view insert format tools table",
20         mode : "specific_textareas",
21         plugins : "autoresize table hr link image charmap lists code emoticons",
22         toolbar : [
23             "formatselect | bold italic | cut copy paste | alignleft aligncenter alignright | outdent indent | image link unlink anchor cleanup hr",
24             "table | bullist numlist | undo redo | removeformat | emoticons charmap | forecolor backcolor | code visualaid help"
25         ],
26         init_instance_callback: function (editor) {
27             editor.on('Dirty', function (e) {
28                 // When a change has been made to the contents of an editor,
29                 // enable the corresponding preference Save button
30                 wysiwyg_change( editor );
31             });
32         }
33     });
34 </script>