[9.2.10] Erreur empêchant la validation des fenêtres TinymCE

This commit is contained in:
fredtempez 2019-11-13 20:27:32 +01:00
parent 8beca81ae4
commit a17d2f9feb
1 changed files with 17 additions and 12 deletions

View File

@ -1,15 +1,20 @@
/** /**
* Initialisation de TinyMCE * Initialisation de TinyMCE
*/ */
tinymce.init({ tinymce.init({
// Classe où appliquer l'éditeur // Classe où appliquer l'éditeur
selector: ".editorWysiwyg", selector: ".editorWysiwyg",
// Aperçu dans le pied de page // Aperçu dans le pied de page
setup:function(ed) { setup:function(ed) {
ed.on('change', function(e) { ed.on('change', function(e) {
$("#footerText").html(tinyMCE.get('themeFooterText').getContent()); if (ed.id === 'themeFooterText') {
}); $("#footerText").html(tinyMCE.get('themeFooterText').getContent());
}, }
});
},
// Langue // Langue
language: "fr_FR", language: "fr_FR",
// Plugins // Plugins
@ -56,7 +61,7 @@ tinymce.init({
baseUrl + "site/data/theme.css", baseUrl + "site/data/theme.css",
baseUrl + "site/data/custom.css" baseUrl + "site/data/custom.css"
], ],
// Classe à ajouter à la balise body dans l'iframe // Classe à ajouter à la balise body dans l'iframe
body_class: "editorWysiwyg", body_class: "editorWysiwyg",
// Cache les menus // Cache les menus
menubar: false, menubar: false,
@ -175,7 +180,7 @@ tinymce.PluginManager.add('stickytoolbar', function(editor, url) {
$(window).on('scroll', function() { $(window).on('scroll', function() {
setSticky(); setSticky();
}); });
function setSticky() { function setSticky() {
var container = editor.editorContainer; var container = editor.editorContainer;
var toolbars = $(container).find('.mce-toolbar-grp'); var toolbars = $(container).find('.mce-toolbar-grp');
@ -209,7 +214,7 @@ tinymce.PluginManager.add('stickytoolbar', function(editor, url) {
}); });
toolbars.css({ toolbars.css({
top:0, top:0,
position: 'relative', position: 'relative',
width: 'auto', width: 'auto',
borderBottom: 'none' borderBottom: 'none'
@ -224,7 +229,7 @@ tinymce.PluginManager.add('stickytoolbar', function(editor, url) {
if (editorTop < 0) { if (editorTop < 0) {
return true; return true;
} }
return false; return false;
} }
@ -236,8 +241,8 @@ tinymce.PluginManager.add('stickytoolbar', function(editor, url) {
var footerHeight = $(container).find('.mce-statusbar').outerHeight(); var footerHeight = $(container).find('.mce-statusbar').outerHeight();
var hiddenHeight = -($(container).outerHeight() - toolbarHeight - footerHeight); var hiddenHeight = -($(container).outerHeight() - toolbarHeight - footerHeight);
if (editorTop < hiddenHeight) { if (editorTop < hiddenHeight) {
return true; return true;
} }