Tag Info

New answers tagged

1

I had the exact same problem and found the solution to this. The problem is that the anchor plugin for TinyMCE is not being included as part of the default Wordpress install. So while Wordpress says to include: $buttons[] = 'anchor'; …that's not going to work because the TinyMCE plugin for anchors isn't there. If you go to TinyMCE's website, you can ...


0

You are most probably having a conflict with some plugin or the theme (bad javascript usually). If you got some kind of an adblocker, this might be another reason too, so you'd better check them all and see if it is a browser-sensitive problem.


0

While I can't see any major fault in doing the way I proposed initially especially in relation to translation and localization, what I realised while researching this issue was that I was asking an ajax question. Basically what's the most efficient method to initialize the I18n components of wordpress. Short of making a custom ajax hook like I had above, I ...


1

As mentioned in the comments, this is a lack of wp_autop() and other formatting functions that get applied to the the_content filter. The editor does not save <p> tags at all, but later on line-breaks are converted into paragraphs via wp_autop(). For meta content, I like to recreate the default filters. I do this because some plugins add things via ...


1

You need to use wp_editor() $old_description = get_post_meta($post->ID, 'sdm_description', true); $editor_id = 'sdm_description'; $settings = array( 'media_buttons' => false ); wp_editor( $old_description , $editor_id, $settings );


1

The "Text" editor is not an HTML editor. If you want to be able to edit raw HTML you will need to use some other editor, but that will probably limit your ability to use the visual editor for the content edited with it. The plugin you mentioned seems like good compromise. The other alternative is to write your own shortcodes for whatever you need to be done. ...


0

Thanks to Bigsmoke it is possible to play with wpautop : A - Enabling or disabling wpautop on selected pages B - Without modifying function.php C - Without messing around old pages if Wpautop filter was removed D - Without squaching the content in the text side of the editor http://wordpress.org/plugins/wpautop-control/ Now i can make most of my text ...


0

I asked this over on Stack Overflow, and got the following answer from user Howlin: There is a plugin that should help you, it's called Visual Editor Custom Buttons. Once installed there is an option on the dashboard menu called Visual Editor Custom Buttons, There is an option called Add new Call the new style something e.g. Cite. ...


0

Well, here's what I found. It doesn't quite explain why the editor was breaking, but it does explain how to add a button properly, without breaking the editor. The PHP code I was trying to add to functions.php actually needed to be added as a plugin. Combining directions from this StackExchange post and this tutorial, I created a WordPress plugin containing ...


0

Because you are using button references to version 3 of TinyMCE. Beginning in WordPress version 3.9; TinyMCE 4 is being used. Check this page, then click the "View Source" tab to see the new button names. Working from your array above: TinyMCE 3 TinyMCE 4 justifyleft => alignleft justifycenter => aligncenter justifyright => alignright ...


0

That's the code I added to my javascript, right before the form is submitted. // Find and loop through all TinyMCE editors. jQuery('#the-form').find( '.wp-editor-area' ).each(function() { var id = jQuery( this ).attr( 'id' ), sel = '#wp-' + id + '-wrap', container = jQuery( sel ), editor = tinyMCE.get( id ); // If the editor ...


0

Your first filter isn't correct. 'styleselect' give you and generate a dropdown on the tinyMCE. You can't add information like that. Here is what to do. Nice way: First, create a separate file called 'custom_wp_admin_editor_tinymce.php' (or what ever). Inside the function.php, include your file with the correct path where you created your previous ...


0

I'm not able to test this right now, but try this: $id = htmlentities('theme_options[px_wp_editor]');


0

Try this : Add this code to functions.php file. add_action( 'init', 'droid_buttons' ); function droid_buttons() { add_filter( "mce_external_plugins", "droid_add_buttons" ); add_filter( 'mce_buttons', 'droid_register_buttons' ); } function droid_add_buttons( $plugin_array ) { $plugin_array['droid'] = get_template_directory_uri() . ...


1

This seems to do it: function allow_nbsp_in_tinymce( $mceInit ) { $mceInit['entities'] = '160,nbsp,38,amp,60,lt,62,gt'; $mceInit['entity_encoding'] = 'named'; return $mceInit; } add_filter( 'tiny_mce_before_init', 'allow_nbsp_in_tinymce' ); Any improvement suggestions?


2

I'm not sure if this question is still relevant or not (so I'm posting for future reference for people), but there is a way to define a css file for the TinyMCE editor in your plugin by using the mce_css filter. For a quick example, I'll take an excerpt from the WordPress documentation: function plugin_mce_css( $mce_css ) { if ( ! empty( $mce_css ) ) ...


0

Another method is to insert this script into ADMIN HEAD to add anything to TinyMce: http://stackoverflow.com/a/24907894/2165415


0

YES, IT IS POSSIBLE! insert this script into ADMIN HEAD, which will access TinyMce: http://stackoverflow.com/a/24907894/2165415



Top 50 recent answers are included