Loading src/UnicaenAutoform/Entity/Db/FormulaireInstance.php +0 −1 Original line number Diff line number Diff line Loading @@ -158,7 +158,6 @@ class FormulaireInstance implements HistoriqueAwareInterface { $responses = $this->getReponses(); usort($responses, function (FormulaireReponse $a, FormulaireReponse $b) { return $a->getChamp()->getOrdre() <=> $b->getChamp()->getOrdre();}); //TODO :: faire mieux voir comment appeler le partial qui va bien ... foreach ($responses as $reponse) { if ($reponse->getChamp()->hasMotsClefs($mots) and $reponse->estNonHistorise()) { Loading src/UnicaenAutoform/View/Helper/partial/input/plus_custom.phtml +34 −11 Original line number Diff line number Diff line Loading @@ -46,26 +46,49 @@ $array = "[" . implode(",", $temp) . "]"; function initTinymce() { // tinymce.remove(); tinymce.init({ // remove les merdes des traitements de texte (ChatGPT) // JP mauvaise idée certaines balises empêche le copier/coller // paste_preprocess: function(plugin, args) { // args.content = args.content.replace(/mso-[^:]+:[^;"]+;?/gi, ''); // }, // remove les styles problématiques (couleur, taille, font, ...) invalid_styles: { '*': 'font-size, color, background, background-color, font-family', }, // remove les balises alterant les tailles de police invalid_elements: 'small', // retrait des classes (car les traitements en ajoutent des absurdement longues) valid_classes: { 'p' : {}, }, selector: '.tinymce', toolbar: 'newdocument undo redo | bold italic underline removeformat | bullist', plugins: 'lists', toolbar: 'newdocument undo redo removeformat | bold italic | bullist numlist ', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, menubar: false, height: 250, body_id: 'description', body_id: 'textarea_<?php echo $champ?->getId(); ?>', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('description').getContent()); $('textarea').val(tinymce.get('description').getContent()); editor .on("focusout", function () { let id = $(this).attr('id'); // console.log(id); $('#'+id).text(tinymce.get(id).getContent()); // console.log(tinymce.get(id).getContent()); // console.log($('#'+id).text()); checkForEmpty(); }) .on("change", function (e) { var event = new CustomEvent("change-via-tinmce", { "detail": "Example of an event" }); document.dispatchEvent(event); }); } }, }); }; } function readOptions(optionsText) { let array = optionsText.split(';'); Loading src/UnicaenAutoform/View/Helper/partial/instance-as-formulaire.phtml +0 −7 Original line number Diff line number Diff line Loading @@ -263,14 +263,7 @@ $qbottom = !((isset($options['raccourci-bottom']) and $options['raccourci-bottom var event = new CustomEvent("change-via-tinmce", { "detail": "Example of an event" }); document.dispatchEvent(event); }); ; }, onchange: function (editor) { alert('change tinymce'); } }); tinymce.activeEditor.on('click', (e) => { console.log('Editor was clicked at: ' + e.pageX + ', ' + e.pageY); }); }); Loading Loading
src/UnicaenAutoform/Entity/Db/FormulaireInstance.php +0 −1 Original line number Diff line number Diff line Loading @@ -158,7 +158,6 @@ class FormulaireInstance implements HistoriqueAwareInterface { $responses = $this->getReponses(); usort($responses, function (FormulaireReponse $a, FormulaireReponse $b) { return $a->getChamp()->getOrdre() <=> $b->getChamp()->getOrdre();}); //TODO :: faire mieux voir comment appeler le partial qui va bien ... foreach ($responses as $reponse) { if ($reponse->getChamp()->hasMotsClefs($mots) and $reponse->estNonHistorise()) { Loading
src/UnicaenAutoform/View/Helper/partial/input/plus_custom.phtml +34 −11 Original line number Diff line number Diff line Loading @@ -46,26 +46,49 @@ $array = "[" . implode(",", $temp) . "]"; function initTinymce() { // tinymce.remove(); tinymce.init({ // remove les merdes des traitements de texte (ChatGPT) // JP mauvaise idée certaines balises empêche le copier/coller // paste_preprocess: function(plugin, args) { // args.content = args.content.replace(/mso-[^:]+:[^;"]+;?/gi, ''); // }, // remove les styles problématiques (couleur, taille, font, ...) invalid_styles: { '*': 'font-size, color, background, background-color, font-family', }, // remove les balises alterant les tailles de police invalid_elements: 'small', // retrait des classes (car les traitements en ajoutent des absurdement longues) valid_classes: { 'p' : {}, }, selector: '.tinymce', toolbar: 'newdocument undo redo | bold italic underline removeformat | bullist', plugins: 'lists', toolbar: 'newdocument undo redo removeformat | bold italic | bullist numlist ', resize: true, language: 'fr_FR', plugins: 'lists', statusbar: true, browser_spellcheck : true, branding: false, menu: {}, menubar: false, height: 250, body_id: 'description', body_id: 'textarea_<?php echo $champ?->getId(); ?>', setup: function (editor) { editor.on("focusout", function () { console.log(tinymce.get('description').getContent()); $('textarea').val(tinymce.get('description').getContent()); editor .on("focusout", function () { let id = $(this).attr('id'); // console.log(id); $('#'+id).text(tinymce.get(id).getContent()); // console.log(tinymce.get(id).getContent()); // console.log($('#'+id).text()); checkForEmpty(); }) .on("change", function (e) { var event = new CustomEvent("change-via-tinmce", { "detail": "Example of an event" }); document.dispatchEvent(event); }); } }, }); }; } function readOptions(optionsText) { let array = optionsText.split(';'); Loading
src/UnicaenAutoform/View/Helper/partial/instance-as-formulaire.phtml +0 −7 Original line number Diff line number Diff line Loading @@ -263,14 +263,7 @@ $qbottom = !((isset($options['raccourci-bottom']) and $options['raccourci-bottom var event = new CustomEvent("change-via-tinmce", { "detail": "Example of an event" }); document.dispatchEvent(event); }); ; }, onchange: function (editor) { alert('change tinymce'); } }); tinymce.activeEditor.on('click', (e) => { console.log('Editor was clicked at: ' + e.pageX + ', ' + e.pageY); }); }); Loading