Bug 22660: Add system pref to allow switching of editors in News Tool
authorLucas Gass <lucas@bywatersolutions.com>
Fri, 8 May 2020 22:57:40 +0000 (22:57 +0000)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 30 Jul 2020 15:44:27 +0000 (17:44 +0200)
commit980dd605031e616f1d481852dffe9cc6779eb3e3
treea520b542df0423e0e2da222acd12f5f69a795ea7
parente68fe2a928bec05b9602fa28dfbc86e04657ce81
Bug 22660: Add system pref to allow switching of editors in News Tool

This patch adds a system preference called 'NewsToolEditor' which allows for the choice between TinyMCE and CodeMirror in the News Feature.

TEST PLAN:
1. Apply patch and run updatedatabase
2. Go to Tools > News and make a new entry or edit an existing News item.
3. When you initially load you should gte the TinyMCE editor (WYSIWYG)
4. Search for the NewsToolEditor system preference and switch to CodeMirror.
5. Reload your News item and now you should see the CodeMirror editor.
6. Try saving content with both and maki sure it works.
7. Try adding some different HTML tags in CodeMirror mode, saving, and making sure it looks right when you switch back to TinyMCE

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Lisette Scheer <lisetteslatah@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
installer/data/mysql/atomicupdate/bug_22660_add_NewsToolEditor_system_preference.perl [new file with mode: 0644]
installer/data/mysql/sysprefs.sql
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/tools.pref
koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt