Skip to content

Commit

Permalink
Upgrade tinymce
Browse files Browse the repository at this point in the history
closes #16859
  • Loading branch information
cedric-anne committed Apr 4, 2024
1 parent bf03b8f commit 866acc4
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion js/RichText/ContentTemplatesParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ GLPI.RichText.ContentTemplatesParameters = class {
this.editor.ui.registry.addAutocompleter(
'content_templates',
{
ch: '{',
trigger: '{',
minChars: 0,
fetch: function (pattern) {
return that.fetchItems(pattern);
Expand Down
2 changes: 1 addition & 1 deletion js/RichText/UserMention.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ GLPI.RichText.UserMention = class {
this.editor.ui.registry.addAutocompleter(
'user_mention',
{
ch: '@',
trigger: '@',
minChars: 0,
fetch: function (pattern) {
return that.fetchItems(pattern);
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"select2": "^4.0.13",
"spectrum-colorpicker2": "^2.0.9",
"spin.js": "^4.1.0",
"tinymce": "^6.7.3",
"tinymce": "^7.0.0",
"tinymce-i18n": "^23.6.19"
},
"scripts": {
Expand Down
5 changes: 5 additions & 0 deletions src/Html.php
Original file line number Diff line number Diff line change
Expand Up @@ -3910,6 +3910,7 @@ public static function initEditorSystem($id, $rand = '', $display = true, $reado
: CFG_GLPI['root_doc']+'/public/lib/tinymce/skins/ui/oxide',
body_class: 'rich_text_container',
content_css: '{$content_css}',
highlight_on_focus: false,
min_height: 150,
resize: true,
Expand Down Expand Up @@ -3943,6 +3944,10 @@ public static function initEditorSystem($id, $rand = '', $display = true, $reado
browser_spellcheck: true,
cache_suffix: '{$cache_suffix}',
// Security options
// Iframes are disabled by default. We assume that administrator that enable it are aware of the potential security issues.
sandbox_iframes: false,
setup: function(editor) {
// "required" state handling
if ($('#$id').attr('required') == 'required') {
Expand Down

0 comments on commit 866acc4

Please sign in to comment.