Changes between Initial Version and Version 1 of Ticket #52050, comment 18
- Timestamp:
- 03/16/2021 09:12:51 AM (5 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #52050, comment 18
initial v1 12 12 * use wp_editor_fix(..) instead wp_editor(...) 13 13 */ 14 function wp_editor_fix($content, $ id, $options)14 function wp_editor_fix($content, $editor_id, $settings = array() ) 15 15 { 16 16 ob_start(); 17 wp_editor($content, $ id, $options);17 wp_editor($content, $editor_id, $settings); 18 18 $out = ob_get_contents(); 19 19 $js = json_encode($out); 20 $id_editor_ctn = $ id.'-ctn';20 $id_editor_ctn = $editor_id.'-ctn'; 21 21 ob_clean(); ?> 22 22 <div id="<?php echo $id_editor_ctn?>"></div> … … 28 28 // init editor 29 29 setTimeout(function() { 30 // get the editor button and simulate a click on it 31 jQuery('#<?php echo $id ?>-tmce').trigger('click'); 30 jQuery('#<?php echo $editor_id ?>-tmce').trigger('click'); 32 31 }, 10); 33 32 }, 50);
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)