Target wp_editor buttons to add a tooltip

The “bold” icon on the visual editor is represented by a <span> with the class of mce_bold. You can target it using jQuery pretty easily and add a tooltip: jQuery(‘.mce_bold’).attr(‘title’, ‘Please use an H2 tag instead.’); If you want to target it inside the HTML editor as well, use this code instead: jQuery(‘.mce_bold, #qt_content_strong’).attr(‘title’, ‘Please … Read more

Adding wp_editor to custom metabox

Unfortunately you can’t yet… see this trac ticket: http://core.trac.wordpress.org/ticket/19173 In particular it seems that: The problem is that TinyMCE, once initialized cannot be moved in the DOM, or rather the browsers cannot handle it being moved. That’s why the errors are so inconsistent in different browsers. Moving the postbox triggers this. Some browsers/versions handle that … Read more

wordpress qtranslate editor text is not working [closed]

I have found a great post which solves this issue, http://wordpress.org/support/topic/plugin-qtranslate-problems-displaying-in-the-edit?replies=21#post-3160564 The issue is on qtranslate_javascript.php line 225 Replace var waitForTinyMCE = window.setInterval(function() { if(typeof(tinyMCE) !== ‘undefined’ && typeof(tinyMCE.get2) == ‘function’ && tinyMCE.get2(‘content’)!=undefined) { content=jQuery(‘#content’).val(); tinyMCE.get2(‘content’).remove(); jQuery(‘#content’).val(content); window.clearInterval(waitForTinyMCE); } }, 250); WITH: Only change the 250 to 500 🙂 this should solve the problem… var … Read more

Change the name of the wp_editor tab “html/text”

Filter gettext_with_context and change the name here: <?php # -*- coding: utf-8 -*- /* Plugin Name: Rename ‘Text’ editor to ‘HTML’ */ add_filter( ‘gettext_with_context’, ‘change_editor_name_to_html’, 10, 4 ); function change_editor_name_to_html( $translated, $text, $context, $domain ) { if ( ‘default’ !== $domain ) return $translated; if ( ‘Text’ !== $text ) return $translated; if ( ‘Name … Read more

`wp_editor()` CSS messing up the jQuery Dialog

Yeah this is a fun one had to make some mods to make this one work…. add this to your theme stylesheet (style.css): .ui-front { z-index: 1001 !important; } .ui-widget-overlay { background: none repeat scroll 0 0 #000000 !important; opacity: .6 !important; filter: Alpha(Opacity = 60) !important; } This should override the editor.css. Let me … Read more

WP_Editor – Saving Value into Plugin Option – Stripping HTML

The Problem This turned out to be a common case of needing to use stripslashes();. How did I figure this out? I logged into phpMyAdmin, navigated to the options table, found my option name, and edited it. Here’s what I discovered… s:11:”description”;s:90:”<span style=\”text-decoration: underline;\”>This is supposed to be underlined text.</span>”; So obviously my plugin is … Read more

Visual/Text tabs in wp editor Not Showing

Without seeing your code I can’t say whats wrong but here is a working (tested) example of a metabox with an editor inside that has the visual/text tabs. add_action( ‘add_meta_boxes’, function() { add_meta_box(‘html_myid_61_section’, ‘Meta Box Title’, ‘my_custom_meta_function’); }); function my_custom_meta_function( $post ) { $text= get_post_meta($post, ‘my_custom_meta’ , true ); wp_editor( htmlspecialchars_decode($text), ‘mettaabox_ID’, $settings = array(‘textarea_name’=>’inputName’) … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)