Tag Info

Hot answers tagged

5

Try this: replace 'theme_advanced_disable' => 'fullscreen' with 'toolbar1'=> 'bold,italic,underline,bullist,numlist,link,unlink,forecolor,undo,redo' Also, remove 'teeny' => true,


4

Add Dashicon All buttons inside the TinyMCE have a class, also your custom button. Include (use wp_enqueue_style() a stylesheet with styling with Dashicons, like the follow example. .myicon:before { content: '\2605'; display: inline-block; -webkit-font-smoothing: antialiased; font: normal 16px/1 'dashicons'; vertical-align: top; } On ...


3

To style the icons using the Dashicons CSS files that are already loaded in the WP dashboard requires adding some extra CSS. In the latest beta of Wordpress (3.9), TinyMCE 4.0 is used so I'm not sure this will work on earlier versions (however a modified version may suit, adjusting for the different classes outputted by previous TinyMCE buttons). In WP 3.9 ...


3

As you noted, setting quicktags to false removes the "visual" and "text" tabs. So, to leave the tabs you need to set quicktags to true and remove the buttons: $settings = array( 'quicktags' => array( 'buttons' => ',' ) ); wp_editor($input, 'editor_name', $settings); To have this in all quicktags ...


2

If you use Text editor, instead of Visual editor, you will add exactly the html code you wanted to add there. It has nothing to do with the PHP code you mentioned, just html from visual editor is transformed in the way you get it later (< and > and so on).


2

Your jQuery code is using the $ symbol without accounting for noConflict mode. More information: http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_Wrappers


2

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 ...


2

I would use the phrase Nested Shortcodes to describe it. You can find many questions using that phrase here on WPSE. The Codex also uses it, for example here: http://codex.wordpress.org/Shortcode_API#Nested_Shortcodes Since the shortcodes in your example are related to the layout, we could perhaps call it: Nested Layout Shortcodes to be ...


2

I was able to resolve both defaulting to the Visual editor and hiding the tabs with the following code. Dumped the following in plugin file: add_filter( 'wp_default_editor', array($this, 'default_editor') ); Hide the tabs with this javascript: $('.wp-editor-tabs').remove(); Or hide it with CSS: .wp-editor-tabs{display:none;}


1

The solution was to use the fullpage plugin. See: http://www.tinymce.com/wiki.php/Plugin3x:fullpage


1

$settings = array( 'tinymce' => array( 'width' => 200 ) ); Gives you a tinymce that's 200px wide. Found it here: http://www.tinymce.com/wiki.php/Configuration When I tried it the background color of my tinymce changed. So maybe you have to tweak that.


1

Well... WordPress uses the wpeditimage tinymce plugin to perform the tasks for the "Add Media" editor button. When you click the pencil icon to edit the image... the wpeditimage plugin will read the image code, and determine if there is a value of _blank for the target attribute. If the value is _blank; the plugin will check the box when the modal window ...


1

Try echo html_entity_decode($ccontent) .


1

If you are using WordPress 4.0+ you can do this using the wp_editor_settings and the global $pagenow to determine if you are on the comments page. add_filter( 'wp_editor_settings', 'remove_editor_quicktags', 10, 2 ); function remove_editor_quicktags( $settings, $id ){ global $pagenow; if ( $id == 'content' && $pagenow === 'comment.php' ){ ...


1

Maybe you should just add a custom field to accept the url itself, in stead of the wp_editor textarea; then append the video embed after you work with the input. Let me know if you need any help setting that up. OR: You could add a separete textarea to accept just comma separated or line-break separated urls (Because you stated below that you might need ...


1

This ended up working for me, uses the tinyMCE init filter to remove the 'statusbar' entirely. /** Edit TinyMCE **/ function myformatTinyMCE($in) { $in['statusbar'] = false; return $in; } add_filter('tiny_mce_before_init', 'myformatTinyMCE' ); Even with CSS, I couldn't find a way to definitely remove the path but keep the status bar - here's the ...


1

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 ...


1

you can solve this problem by enqueue the following script with the dependency of jQuery jQuery(document).ready(function(){ tinyMCEPreInit.dragDropUpload = false; }); To add the dependency you can refer this link I have tested this solution and it has worked for me. I hope it will work for you too.


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

The code below will work, read inline comments. Paste it into your theme functions.php or plugin. The only problem with this is the it will only work when the template is selected and the post is saved/updated and the editor is blank. <?php function wpse_177576_update_editor_content( $post_id ) { if ( wp_is_post_revision( $post_id ) ) ...



Only top voted, non community-wiki answers of a minimum length are eligible