Bug 27796: (QA follow-up) Missing filters
[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 <!-- wysiwyg-systempreferences.inc -->
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         relative_urls : false,
18         content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css",
19         editor_selector : "mce",
20         menubar : "file edit view insert format tools table",
21         mode : "specific_textareas",
22         plugins : "autoresize table hr link image charmap lists code emoticons",
23         toolbar : [
24             "formatselect | bold italic | cut copy paste | alignleft aligncenter alignright | outdent indent | image link unlink anchor cleanup hr",
25             "table | bullist numlist | undo redo | removeformat | emoticons charmap | forecolor backcolor | code visualaid help"
26         ],
27         init_instance_callback: function (editor) {
28             editor.on('Dirty', function (e) {
29                 // When a change has been made to the contents of an editor,
30                 // enable the corresponding preference Save button
31                 wysiwyg_change( editor );
32             });
33         }
34     });
35 </script>
36 <!-- / wysiwyg-systempreferences.inc -->