Loading src/UnicaenAutoform/View/Helper/partial/input/plus_custom.phtml +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ $array = "[" . implode(",", $temp) . "]"; } function initTinymce() { tinymce.remove(); // tinymce.remove(); tinymce.init({ selector: '.tinymce', toolbar: 'newdocument undo redo | bold italic underline removeformat | bullist', Loading src/UnicaenAutoform/View/Helper/partial/input/textarea.phtml +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ $options = ($champ->getOptions() !== null)??explode(';', $champ->getOptions()); <?php endif; ?> <div class="col-sm-12"> <textarea class="form-control autoform-textarea" class="form-control autoform-textarea tinymce" id="textarea_<?php echo $champ->getId(); ?>" name="<?php echo $champ->getId(); ?>" <?php if ($champ->isObligatoire()) : ?> required <?php endif; ?> ><?php echo $reponse?trim($reponse):""; ?></textarea> Loading src/UnicaenAutoform/View/Helper/partial/instance-as-formulaire.phtml +14 −2 Original line number Diff line number Diff line Loading @@ -238,7 +238,7 @@ $qbottom = !((isset($options['raccourci-bottom']) and $options['raccourci-bottom valid_classes: { 'p' : {}, }, selector: '.autoform-textarea', selector: '.tinymce', plugins: 'lists', toolbar: 'newdocument undo redo removeformat | bold italic | bullist numlist ', resize: true, Loading @@ -250,16 +250,28 @@ $qbottom = !((isset($options['raccourci-bottom']) and $options['raccourci-bottom menubar: false, body_id: 'textarea_<?php echo $champ?->getId(); ?>', setup: function (editor) { editor.on("focusout", function () { 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); }); ; }, 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/View/Helper/partial/input/plus_custom.phtml +1 −1 Original line number Diff line number Diff line Loading @@ -44,7 +44,7 @@ $array = "[" . implode(",", $temp) . "]"; } function initTinymce() { tinymce.remove(); // tinymce.remove(); tinymce.init({ selector: '.tinymce', toolbar: 'newdocument undo redo | bold italic underline removeformat | bullist', Loading
src/UnicaenAutoform/View/Helper/partial/input/textarea.phtml +1 −1 Original line number Diff line number Diff line Loading @@ -38,7 +38,7 @@ $options = ($champ->getOptions() !== null)??explode(';', $champ->getOptions()); <?php endif; ?> <div class="col-sm-12"> <textarea class="form-control autoform-textarea" class="form-control autoform-textarea tinymce" id="textarea_<?php echo $champ->getId(); ?>" name="<?php echo $champ->getId(); ?>" <?php if ($champ->isObligatoire()) : ?> required <?php endif; ?> ><?php echo $reponse?trim($reponse):""; ?></textarea> Loading
src/UnicaenAutoform/View/Helper/partial/instance-as-formulaire.phtml +14 −2 Original line number Diff line number Diff line Loading @@ -238,7 +238,7 @@ $qbottom = !((isset($options['raccourci-bottom']) and $options['raccourci-bottom valid_classes: { 'p' : {}, }, selector: '.autoform-textarea', selector: '.tinymce', plugins: 'lists', toolbar: 'newdocument undo redo removeformat | bold italic | bullist numlist ', resize: true, Loading @@ -250,16 +250,28 @@ $qbottom = !((isset($options['raccourci-bottom']) and $options['raccourci-bottom menubar: false, body_id: 'textarea_<?php echo $champ?->getId(); ?>', setup: function (editor) { editor.on("focusout", function () { 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); }); ; }, onchange: function (editor) { alert('change tinymce'); } }); tinymce.activeEditor.on('click', (e) => { console.log('Editor was clicked at: ' + e.pageX + ', ' + e.pageY); }); }); Loading