Tag Info

Hot answers tagged

4

Make sure you've registered the stylesheet for the editor: add_editor_style( 'http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css' ); This should be in your functions.php https://codex.wordpress.org/Editor_Style


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


3

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 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;}


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

Yes as per @Nibbr Web Development, TinyMCE editor IDs cannot have brackets. Which is the html field ID, so what we will do is create a different but similiar name for the ID attribute and still use our desired name in for the text area field name, like so. $content = $options['textareafield']; // editor_id cannot have brackets and must be lowercase ...


1

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


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


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

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



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