How to make float element in tinymce

You could add custom quick tags (for the text editor) easily as follows function wpse182089_add_float_quicktags() { if (wp_script_is(‘quicktags’)){ ?> <script type=”text/javascript”> QTags.addButton( ‘floatr’, ‘float right’, ‘<span style=”float: right”>’, ‘</span>’, ”, ”, 41 ); QTags.addButton( ‘floatl’, ‘float left’, ‘<span style=”float: left”>’, ‘</span>’, ”, ”, 42 ); </script> <?php } } add_action( ‘admin_print_footer_scripts’, ‘wpse182089_add_float_quicktags’ ); You could … Read more

wpeditor issue – shows both mode and not able to focus/edit during visual mode

There are a few ways you can go about adding a wpeditor to text areas. If you have the id value of the textbox you can use this JavaScript command to add the tinyMCE buttons to it dynamically. tinyMCE.execCommand(‘mceAddControl’, false, ‘textbox_id’); In your functions.php, add this code: add_action( ‘edit_page_form’, ‘mytextarea_for_page’ ); function mytextarea_for_page() { wp_editor( … Read more

Dynamically adding WYSIWYG to metaboxes

I am not sure if this is what you want: (Source: https://stackoverflow.com/questions/3493313/how-to-add-wysiwyg-editor-in-wordpress-meta-box) add_action( ‘add_meta_boxes’, ‘adding_new_metaabox’ ); function adding_new_metaabox() { add_meta_box(‘html_myid_61_section’, ‘TITLEE Helloo’, ‘my_output_function’); } function my_output_function( $post ) { //so, dont ned to use esc_attr in front of get_post_meta $valueeee2= get_post_meta($_GET[‘post’], ‘SMTH_METANAME_VALUE’ , true ) ; wp_editor( htmlspecialchars_decode($valueeee2), ‘mettaabox_ID_stylee’, $settings = array(‘textarea_name’=>’MyInputNAME’) ); } function … Read more