jQuery Validate wp_editor

I have a form, and in the form, I use <?php wp_editor(”, ‘user_submitted_progress’, $settings = array(‘textarea_name’ => ‘user_submitted_progress’)); ?> to generate a TinyMCE, rather than a simple textarea. The problem is that I can’t get the wp_editor to be validated by jQuery Validation. Here is my code for jQuery Validation $(document).ready(function() { $(“#user_submitted_post”).validate({ errorPlacement: function(error, … Read more

Add table controls with wp_editor minimal editor configuration (‘teeny’)

I want to add the table controls for wp_editor(tinymce) initiated with teeny=>true. Here is what I have done so far (without success): <?php $tinymce_options = array(‘plugins’ => “table”, ‘theme_advanced_buttons2’ => “tablecontrols”); $editor_config= array(‘teeny’=>true, ‘textarea_rows’=>5, ‘editor_class’=>’csec_text’, ‘textarea_name’=>’csec_text’, ‘wpautop’=>false, ‘tinymce’=>$tinymce_options); wp_editor($content, $id, $editor_config); ?> Can anyone suggest anything reagrding this? Thanks in advance. I’m using: WordPress 5.1.1 … Read more

Get data from wp_editor()

I can use wp_editor() function for add custom post use wp_insert_post() function (with post_content parameter) in my plugin. I need to can be saved data from wp_editor() function. How can i get output ? Thanks so much. 1 Answer 1 $content=””; $editor_id = ‘mycustomeditor’; wp_editor( $content, $editor_id ); /** If you want to get data … Read more

Registering custom TinyMCE buttons, for admin area, to work with custom instances of wp_editor

Thanks to this answer here, I am able to use different instances of wp_editor to determine which buttons each of my differing TinyMCE instances use. However, I’m struggling to actually get my buttons registered – they’re simply not appearing on the TinyMCE interface the way I think they should! I’ve tried two different approaches – … Read more

TinyMCE strips line breaks on mceAddControl

I’m using wp_editor to add wysiwyg fields to admin edit screens. Each wysiwyg lives within a draggable meta box. Since TinyMCE has issues with dragging, I’m using the following code: // on the dragstart event tinyMCE.execCommand(‘mceRemoveControl’, false, the_editor_id); // on the dragstop event tinyMCE.execCommand(‘mceAddControl’, false, the_editor_id); The problem is that, when mceAddControl is fired, all … Read more