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 80d6d68dff..9cc58f371d 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
@@ -1,19 +1,23 @@
[% USE raw %]
[% USE Asset %]
+[% USE Koha %]
[% USE KohaDates %]
[% USE Branches %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
-[% Asset.css("lib/codemirror/codemirror.css") | $raw %]
-
Koha › Tools › News
[% INCLUDE 'doc-head-close.inc' %]
[% IF ( opac_news_count ) %]
[% END %]
+[% IF Koha.Preference('NewsToolEditor') == 'codemirror' %]
+ [% Asset.css("lib/codemirror/codemirror.css") | $raw %]
+ [% Asset.css("lib/codemirror/lint.min.css") | $raw %]
+
+[% END %]
@@ -208,12 +212,12 @@ Edit news item[% ELSE %]Add news item[% END %][% ELSE %]News[% END %]
[% END %]
+
+
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'calendar.inc' %]
[% Asset.js("js/tools-menu.js") | $raw %]
- [% Asset.js("lib/d3c3/d3.min.js") | $raw %]
- [% Asset.js("lib/d3c3/c3.min.js") | $raw %]
[% IF ( opac_news_count ) %]
[% INCLUDE 'datatables.inc' %]
[% END %]
- [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
- [% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %]
- [% INCLUDE 'str/tinymce_i18n.inc' %]
-
+ [% IF Koha.Preference('NewsToolEditor') == 'codemirror' %]
+ [% Asset.js( "lib/codemirror/codemirror.min.js" ) | $raw %]
+ [% Asset.js( "lib/codemirror/xml.min.js" ) | $raw %]
+ [% Asset.js( "lib/codemirror/lint.min.js" ) | $raw %]
+ [% Asset.js( "lib/linters/htmlhint.min.js" ) | $raw %]
+ [% Asset.js( "lib/codemirror/html-lint.min.js" ) | $raw %]
+
+ [% ELSE %]
+ [% INCLUDE 'str/tinymce_i18n.inc' %]
+ [% Asset.js("lib/tiny_mce/tinymce.min.js") | $raw %]
+
+ [% END # /IF NewsToolEditor %]
[% END %]
[% BLOCK lang_locations %]