1(function(window, $, undefined) { 2 3 $(function() { 4 5 wpcf7_wysiwyg_init_all(); 6 7 }); 8 9 function wpcf_wysiwyg_update_content(editor_id, content) { 10 $('textarea.wysiwyg#' + editor_id).text(content); 11 } 12 13 function wpcf7_wysiwyg(id) { 14 15 var hasMediaButtons = $(`#${id}`).parent().closest('.wpcf7-wysiwyg-container').hasClass('--has-mediaButton'); 16 17 wp.editor.initialize(id, { 18 tinymce: { 19 wpautop: true, 20 plugins: 'charmap colorpicker compat3x directionality fullscreen hr image lists media paste tabfocus textcolor wordpress wpautoresize wpdialogs wpeditimage wpemoji wpgallery wplink wptextpattern wpview', 21 toolbar1: 'formatselect bold italic | bullist numlist | blockquote | alignleft aligncenter alignright | link unlink | wp_more fullscreen wp_adv', 22 toolbar2: 'strikethrough, hr, forecolor, pastetext, removeformat, charmap, outdent, indent, undo, redo, wp_help', 23 setup: function(editor) { 24 editor.on('keyup', function(e) { 25 wpcf_wysiwyg_update_content(editor.id, editor.getContent()); 26 }); 27 } 28 }, 29 quicktags: true, 30 mediaButtons: hasMediaButtons 31 }); 32 33 } 34 35 function wpcf7_wysiwyg_init(id) { 36 37 wp.editor.remove(id); 38 wpcf7_wysiwyg(id); 39 40 } 41 42 function wpcf7_wysiwyg_init_all() { 43 44 $('.wpcf7-wysiwyg-container').each(function() { 45 46 if ( $(this).find('textarea.wysiwyg').length > 0 ) { 47 48 wp.editor.remove($(this).find('textarea.wysiwyg').attr('id')); 49 wpcf7_wysiwyg($(this).find('textarea.wysiwyg').height('300px').attr('id')); 50 51 } 52 53 }); 54 55 } 56 57 // Expose functions 58 window.wpcf7_wysiwyg_init = wpcf7_wysiwyg_init; 59 window.wpcf7_wysiwyg_init_all = wpcf7_wysiwyg_init_all; 60 61})(window, jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.