Plugin Directory

Changeset 2417443


Ignore:
Timestamp:
11/12/2020 07:37:09 PM (5 years ago)
Author:
dimchtz
Message:

new version 1.0.2

Location:
wysiwyg-editor-for-contact-form-7
Files:
22 added
4 edited

Legend:

Unmodified
Added
Removed
  • wysiwyg-editor-for-contact-form-7/trunk/assets/js/main.frontend.js

    r2416820 r2417443  
    77    });
    88
    9     function wpcf7_wysiwyg_register_events() {
    10 
    11         $('form.wpcf7-form').each(function() {
    12             $(this).submit(function(e) {
    13                 $(this).find('.wpcf7-wysiwyg-container').each(function() {
    14                     var id = $(this).find('textarea.wysiwyg').attr('id');
    15                     $(this).find('textarea.wysiwyg').text(tinymce.editors[id].getContent());
    16                 });
    17             });
    18         });
    19 
     9    function wpcf_wysiwyg_update_content(editor_id, content) {
     10        $('textarea.wysiwyg#' + editor_id).text(content);
    2011    }
    2112
     
    2718                plugins:    'charmap colorpicker compat3x directionality fullscreen hr image lists media paste tabfocus textcolor wordpress wpautoresize wpdialogs wpeditimage wpemoji wpgallery wplink wptextpattern wpview',
    2819                toolbar1:   'formatselect bold italic | bullist numlist | blockquote | alignleft aligncenter alignright | link unlink | wp_more fullscreen wp_adv',
    29                 toolbar2:   'strikethrough, hr, forecolor, pastetext, removeformat, charmap, outdent, indent, undo, redo, wp_help' ,
     20                toolbar2:   'strikethrough, hr, forecolor, pastetext, removeformat, charmap, outdent, indent, undo, redo, wp_help',
     21                setup: function(editor) {
     22                    editor.on('keyup', function(e) {
     23                        wpcf_wysiwyg_update_content(editor.id, editor.getContent());
     24                    });
     25                }
    3026            },
    31             quicktags: true
     27            quicktags: true,
     28            mediaButtons: true
    3229        });
    3330
     
    3835        wp.editor.remove(id);
    3936        wpcf7_wysiwyg(id);
    40 
    41         wpcf7_wysiwyg_register_events();
    4237
    4338    }
     
    5651        });
    5752
    58         wpcf7_wysiwyg_register_events();
    59 
    6053    }
    6154
    6255    // Expose functions
    63     window.wpcf7_wysiwyg_init = wpcf7_wysiwyg_init;
    64     window.wpcf7_wysiwyg_init_all = wpcf7_wysiwyg_init_all;
     56    window.wpcf7_wysiwyg_init       = wpcf7_wysiwyg_init;
     57    window.wpcf7_wysiwyg_init_all   = wpcf7_wysiwyg_init_all;
    6558
    6659})(window, jQuery);
  • wysiwyg-editor-for-contact-form-7/trunk/contact-form-7-wysiwyg.php

    r2417374 r2417443  
    1010 * Plugin URI:        https://github.com/DimChtz/contact-form-7-wysiwyg
    1111 * Description:       Adds WYSIWYG Editor field for Contact Form 7
    12  * Version:           1.0.1
     12 * Version:           1.0.2
    1313 * Author:            Dimitris Chatzis
    1414 * Author URI:        https://github.com/DimChtz
  • wysiwyg-editor-for-contact-form-7/trunk/includes/modules/frontend.php

    r2417374 r2417443  
    7575        }
    7676
     77        wp_enqueue_media();
    7778        wp_enqueue_editor();
    7879
  • wysiwyg-editor-for-contact-form-7/trunk/readme.txt

    r2417374 r2417443  
    66Tested up to: 5.5
    77Requires PHP: 5.6
    8 Stable Tag: 1.0.1
     8Stable Tag: 1.0.2
    99License: GPLv2 or later
    1010License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3434== Changelog ==
    3535
     36= 1.0.2 =
     37* Fixed tinymce editor events
     38* Added media upload button
     39
    3640= 1.0.1 =
    3741* Fixed autoloader issue
Note: See TracChangeset for help on using the changeset viewer.