<commit_before><div data-control="wysiwyg">
    <textarea name="<?php echo $name ?>" id="<?php echo $this->getId('textarea') ?>"><?= e($value) ?></textarea>
</div>
<script>
    
    function elFinderBrowser (field_name, url, type, win)
    {
        tinymce.activeEditor.windowManager.open({
            file: '<?php echo URL::to('elfinder/tinymce4'); ?>',// use an absolute path!
            title: 'elFinder 2.0',
            width: 900,
            height: 450,
            resizable: 'yes'
        }, {
            setUrl: function (url) {
                win.document.getElementById(field_name).value = url;
            }
        });
        return false;
    }

    function tinymceInit()
    {
        tinyMCE.baseURL = "<?php echo url('/plugins/anandpatel/wysiwygeditors/formwidgets/editor/assets/tinymce'); ?>";
        tinymce.init({
            selector: 'textarea#<?php echo $this->getId('textarea') ?>',
            theme: "modern",
            setup: function (editor) {
                editor.on('change', function () {
                    tinymce.triggerSave();
                });
            },
            relative_urls: false,
            width:    '<?php echo $width; ?>',
            height:   '<?php echo $height; ?>',
            plugins : [
                "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
                "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
                "save table contextmenu directionality emoticons template paste textcolor"
            ],
            toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media | preview",
            file_browser_callback : elFinderBrowser

        });
    }
    
    $(document).ready( function() {
        if (typeof tinymce === 'undefined') {
            $.getScript('<?php echo url('/plugins/anandpatel/wysiwygeditors/formwidgets/editor/assets/tinymce/tinymce.min.js'); ?>', function () {
                tinymceInit();
            });
        } else {
            tinymceInit();
        }<commit_msg>Fix wrong plugin filename request by tinymce<commit_after><div data-control="wysiwyg">
    <textarea name="<?php echo $name ?>" id="<?php echo $this->getId('textarea') ?>"><?= e($value) ?></textarea>
</div>
<script>
    
    function elFinderBrowser (field_name, url, type, win)
    {
        tinymce.activeEditor.windowManager.open({
            file: '<?php echo URL::to('elfinder/tinymce4'); ?>',// use an absolute path!
            title: 'elFinder 2.0',
            width: 900,
            height: 450,
            resizable: 'yes'
        }, {
            setUrl: function (url) {
                win.document.getElementById(field_name).value = url;
            }
        });
        return false;
    }

    function tinymceInit()
    {
        tinyMCE.baseURL = "<?php echo url('/plugins/anandpatel/wysiwygeditors/formwidgets/editor/assets/tinymce'); ?>";
        tinyMCE.suffix = '.min';
        tinymce.init({
            selector: 'textarea#<?php echo $this->getId('textarea') ?>',
            theme: "modern",
            setup: function (editor) {
                editor.on('change', function () {
                    tinymce.triggerSave();
                });
            },
            relative_urls: false,
            width:    '<?php echo $width; ?>',
            height:   '<?php echo $height; ?>',
            plugins : [
                "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
                "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
                "save table contextmenu directionality emoticons template paste textcolor"
            ],
            toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media | preview",
            file_browser_callback : elFinderBrowser
            
        });
    }
    
    $(document).ready( function() {
        if (typeof tinymce === 'undefined') {
            $.getScript('<?php echo url('/plugins/anandpatel/wysiwygeditors/formwidgets/editor/assets/tinymce/tinymce.min.js'); ?>', function () {
                tinymceInit();
            });
        } else {
            tinymceInit();
        }
{'fraction_non_alphanumeric': 0.1284116331096197, 'fraction_numerical': 0.004026845637583893, 'mean_word_length': 1.9926372155287817, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5203735', 'n_tokens_mistral': 1248, 'n_tokens_neox': 1204, 'n_words': 282}