From 14a53a4d5e5f3677a854a529248f6585ca8ef5cb Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 9 Jun 2020 15:54:04 +1000 Subject: [PATCH] Bug 25697: Declare base url and suffix in tinymce init This patch declares the base url and suffix in tinymce init, so that tinymce will initialize properly cross-browser. Without this change, tinymce will fail to initialize on IE 11. Test plan: 0. Apply patch 1. Open IE 11 2. Enable "UseWYSIWYGinSystemPreferences" system preference 3. Go to /cgi-bin/koha/admin/preferences.pl?tab=opac and note that tinymce initializes correctly 4. Go to /cgi-bin/koha/tools/koha-news.pl and create/edit a news item, and note that tinymce initializes correctly 5. Go to /cgi-bin/koha/admin/branches.pl and add/edit a library, and note that tinymce initializes correctly for "OPAC info" --- koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc | 3 +++ koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt | 3 +++ koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt | 3 +++ 3 files changed, 9 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc index bcfd0f1648..386a577eed 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/wysiwyg-systempreferences.inc @@ -14,6 +14,9 @@ tinyMCE.init({ branding : false, + //suffix and base_url required for IE 11 + suffix: '.min', + base_url: "[% interface | html %]/lib/tiny_mce", content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css", editor_selector : "mce", menubar : "file edit view insert format tools table", diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt index 68488d79be..2a2f0c9fcd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tt @@ -290,6 +290,9 @@ tinyMCE.init({ branding : false, + //suffix and base_url required for IE 11 + suffix: '.min', + base_url: "[% interface | html %]/lib/tiny_mce", content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css", menubar : "file edit view insert format tools table", mode : "specific_textareas", diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt index 062f0e1642..6423c30fb7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt @@ -301,6 +301,9 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %] force_p_newlines : false, forced_root_block : '', branding : false, + //suffix and base_url required for IE 11 + suffix: '.min', + base_url: "[% interface | html %]/lib/tiny_mce", content_css : "[% interface | html %]/[% theme | html %]/css/tinymce.css", menubar : "file edit view insert format tools table", mode : "specific_textareas", -- 2.16.4