WordPress 3.2.1 with tinyMCE editor
-
I just can’t make a textarea work as the tinyMCE editor in a test plugin I’ m playing with.
I have tryied many different ways but don’t know what I’m doing wrong.
My last attempt was with the use of the_editor() and wp_tiny_mce() with wich I can see some buttons doing nothig without a place to enter text.Here is the code in one of my attempts:
add_filter('admin_head','myplugin_tinymce'); function myplugin_tinymce() { wp_enqueue_script('common'); wp_enqueue_script('jquery-color'); wp_admin_css('thickbox'); wp_print_scripts('post'); wp_print_scripts('media-upload'); wp_print_scripts('jquery'); wp_print_scripts('jquery-ui-core'); wp_print_scripts('jquery-ui-tabs'); wp_print_scripts('tiny_mce'); wp_print_scripts('editor'); wp_print_scripts('editor-functions'); add_thickbox(); wp_tiny_mce(); wp_admin_css(); wp_enqueue_script('utils'); do_action("admin_print_styles-post-php"); do_action('admin_print_styles'); remove_all_filters('mce_external_plugins'); } ?> <div id="poststuff"> <div id="<?php echo user_can_richedit() ? 'postdivrich' : 'postdiv'; ?>" class="postarea"><?php the_editor("<strong>hello world strong!</strong>"); ?> <?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?> <?php wp_nonce_field( 'meta-box-order', 'meta-box-order-nonce', false ); ?> </div> </div>I’ve entered the code above in the same file. Not sure where I was supposed to put it.
Also if this somehow gets to work could qtranslate plugin recognise the textarea and add its language tabs?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘WordPress 3.2.1 with tinyMCE editor’ is closed to new replies.