TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL. TinyMCE has the ability to convert HTML TEXTAREA fields or other HTML elements to editor instances.

learn more… | top users | synonyms

13
votes
6answers
12k views

Extra TinyMCE editor strips <p> and <br> tags?

Hey guys, I've added a TinyMCE to some textareas that are displayed in a custom meta box. All of the formatting works perfectly fine, except that the editor will not save <p> or <br/> ...
6
votes
1answer
581 views

How to load wp_editor via AJAX

Does anyone know how o load wp_editor via AJAX in WordPress? My markup and editor is getting loaded properly but editor controls are not getting loaded properly, it may be because Javascript is not ...
6
votes
2answers
1k views

WordPress 3.9 - Trouble Editing new TinyMCE

With WordPress 3.9 coming soon it's bringing along TinyMCE 4.0. I'm running my plugins and functions through some testing and found that one of my functions seems broken / not working with the new ...
6
votes
1answer
1k views

Load wp_editor via ajax [duplicate]

Possible Duplicate: How to load wp_editor() through AJAX/jQuery I know that this has been asked before but it has not been answered fully or accurately or descriptively. I know how to load ...
9
votes
2answers
8k views

Creating a wp_editor instance with custom tinyMCE buttons

Is there a way to define wp_editor() with custom tinyMCE buttons? I've noticed the wp_editor function reference mentions that one of the $settings arguments can be tinymce (array) (optional) Load ...
4
votes
1answer
3k views

How to customize TinyMCE4 in WP 3.9 - the old way for styles and formats doesn't work anymore

Before WP 3.9 i had the following two filters applied in the functions.php: function my_mce_buttons_2( $buttons ) { array_unshift( $buttons, 'styleselect' ); return $buttons; } ...
8
votes
1answer
1k views

Add button to TinyMCE bar without creating a plugin

I'm trying to add a custom button or two to the TinyMCE rich text editor. The tutorials I've seen so far are either outdated or explain how to do it with a custom plugin. How can I do this without ...
9
votes
2answers
5k views

Add custom TinyMCE 4 Button, Usable since WordPress 3.9-beta1

How is it possible to add a custom button to the visual editor TinyMCE, Version 4? Currently I found this q&a with a little bit hints to the topic, but not a solution or a how to. But I can't ...
2
votes
2answers
1k views

Registering custom TinyMCE buttons, for admin area, to work with custom instances of wp_editor

Thanks to this answer here, I am able to use different instances of wp_editor to determine which buttons each of my differing TinyMCE instances use. However, I'm struggling to actually get my buttons ...
5
votes
3answers
2k views

Wordpress 3.2 has broken my TinyMCE code

My code was working up until the 3.2 update, where I noticed that tinyMCE has been updated too. Does anyone have any ideas why this may not work now? I don't get any console errors but I don't get ...
3
votes
1answer
1k views

Instantiate TinyMCE via JS ( rather than PHP/wp_editor )

Once a page has loaded, how do I create a TinyMCE editor? Putting a wp_editor call in an AJAX request then displaying it gives this: Visual and text tabs are nonfunctional, no toolbar, no active ...
0
votes
3answers
1k views

How to use tinyMCE for user “biographical info” without messing with any core file?

I noticed when you typein the user's “biographical info” on the profile, it shows up in one page! Looks really terrible. So: Is there a way to use tinyMCE or other solution for user “biographical ...
5
votes
2answers
5k views

How to add multiple buttons to TinyMCE?

I've followed a tutorial on Nettuts on how to add a custom button to TinyMCE (http://net.tutsplus.com/tutorials/wordpress/wordpress-shortcodes-the-right-way/) It works great and all, but i want to ...
4
votes
1answer
4k views

How to get the input of a TinyMCE editor when using on the front-end?

I'm not sure why I haven't been able to find this, but does anyone know how to get the input of the TinyMCE editor? I am using it in the front end and want to be able to save whatever the user has ...
4
votes
3answers
3k views

How to use tinyMCE for user “biographical info”?

I would like to provide our WP users (authors) with a tinyMCE editor instead of standard textarea for their "Biographical Info" on the Profile page. I have spent a lot of time searching online for ...
3
votes
5answers
2k views

How to force TinyMCE in WodPress to replace newlines with <br> tags and not with <p>&nbsp;</p>

TinyMCE editor inserts <p>&nbsp;</p> instead of <br> tags when I press enter in my text for a new line. How to force TinyMCE in WP to replace newlines with <br> and not ...
2
votes
2answers
8k views

How to add a custom button to the tinyMCE toolbar?

I want to add a custom button to the tinyMCE toolbar in the 'Add New Post' screen which when clicked, will insert text into the new post. I have tried using this code (from ...
1
vote
1answer
703 views

Adding TinyMCE custom buttons when using teeny_mce_before_init

I'm using the following code to produce a different TinyMCE bar to the default WordPress setup: if (function_exists('wp_tiny_mce')) { add_filter("mce_external_plugins", ...
0
votes
1answer
1k views

Restrict file uploads by extension?

Is there a way in WordPress 3.1 to restrict allowed file uploads by extension (images only) and file size? Bonus question: Can I limit users to only be able view files they have uploaded themselves?
4
votes
1answer
1k views

Stop certain classes showing up in TinyMCE Advanced Style dropdown

I'm using the TinyMCE Advanced plugin so that I can add my own custom styles to the Style dropdown in the Visual Editor. However, I don't want some of the styles that are included in the style.css ...
3
votes
2answers
958 views

Shortcode to insert <!--nextpage-->

Since wordpress does not have a menu icon (aka "user friendly) way to add the command to a post or page, I'm trying to create a shortcode to do it. However, as logic would have it, its not that ...
3
votes
2answers
2k views

How i can i add a split button or list box to the WordPress TinyMCE instance

I have added a custom button to the tinymce to insert my shortcodes, but I have so many and I want to make a splitbutton instead and I can't figure how. Anyone can help. Here's the code that I've used ...
1
vote
3answers
1k views

Preserving tabs and line breaks in <pre><code> when switching from HTML to Visual Editor

Tabs placed in a <pre><code></code></pre> block are stripped and line breaks are removed leaving a single continuous line of text. This occurs when switching from html to ...
6
votes
3answers
6k views

Wordpress automatically adding “&nbsp;”?

I'm not sure if is wordpress itself or Tiny MCE that's doing it. But when switching between HTML and Visual editor it's adding &nbsp;, and adding an extra one each time I switch back and forth. I ...
4
votes
2answers
2k views

How to add TinyMCE keyboard shortcut

The most thorough documentation I can find of how to add a new keyboard shortcut to TinyMC is at this page: http://www.lifeinsuranceonmyterms.com/other/custom-keyboard-shortcuts-for-tinymce-how-to It ...
4
votes
2answers
2k views

Forcing reload of editor-style.css

Is there a method to force the refresh of editor-style.css, when I change manually the stylesheet for the TinyMCE editor? Modification doesn't show immediately but they will be cached in the admin ...
3
votes
1answer
4k views

TinyMCE: adding CSS to format dropdown

I successfully added a TinyMCE stylesheet using add_editor_style() so that I can preview the styles in the body of the TinyMCE editor. However, am I right in assuming that the add_editor_style() ...
3
votes
1answer
936 views

Enqueue Script After TinyMCE initialized

I am making a small live preview area inside a meta box using jquery where i need to get content from tinymce editor. But it seem my script loads before tinymce, this returns null when i try to get ...
2
votes
1answer
4k views

Load tinyMCE / wp_editor() via AJAX [duplicate]

Possible Duplicate: How to load wp_editor() through AJAX/jQuery There are several questions about this (like this, or that), but none of them provides a solution to me. The situation: I ...
2
votes
2answers
910 views

Can't add a class to links in the visual editor since WP 3.1?

Did this feature chang in 3.1? I recall that I could change the class of the link in the thickbox popup.
2
votes
1answer
288 views

Want to have the Post editor remembering the last editing position

As you probably know the WordPress theme editor remembers its last editing position, but I want my post editor to do the same (it jumps to the top if you save a post/page).... Any tips/hacks how to ...
1
vote
1answer
6k views

How to disable TinyMCE from removing span tags

I am posting Word generated HTML to WordPress via XMLRPC. Before I go to post.php, the format is correctly preserved in the database. TinyMCE performs its magic and I lose quite a few formatting ...
0
votes
1answer
188 views

Using post ID in custom tinyMCE button

I'm building a simple plugin and need to be able to access current post id when user clicks custom tinyMCE button (inside its onclick function). How should I get current post ID to do that. Just for ...
5
votes
2answers
1k views

How to provide translations for a WordPress TinyMCE plugin?

I know that I can get my translations into JavaScript doing: $MyTranslations = array( 'translation1' => __("Some String 1", "MyTranslations"), 'translation2' => __("Some ...
2
votes
2answers
2k views

How to use the new Dashicons for custom TinyMCE buttons?

I've been following a tutorial on Tuts+ (linked from the WordPress Codex) on how to interact with the TinyMCE editor to add buttons. Following the example code on that article, I have a JS file which ...
2
votes
1answer
88 views

all tincymce's switch when updating page after changing from html to text in custom metabox

I have a custom metabox which uses wp_editor and when i switch to text editor instead of visual the main content tinymce also changes to text view when i update. I was wondering am i doing something ...
1
vote
1answer
168 views

Unable to add “code” button to TinyMCE toolbar

This is driving me crazy. Using code from the WP codex, I can add SOME buttons to the TinyMCE bar, but NOT others. For example this code: function my_mce_buttons_2($buttons) { /** * Add ...
1
vote
1answer
145 views

TinyMCE style_select - Append Classes

TL;DR Question How do I create a submenu for my classes with style_format? Can I append a submenu to the existing menu? With the new Styleselect in TinyMCE 4.0 there's a bunch of predefined ...
1
vote
1answer
598 views

TinyMCE - Show Advanced Options (2nd Row) By Default

So I've customized my tinyMCE a bit to add some buttons and rearrange some things: function myformatTinyMCE($in) { ...
1
vote
2answers
2k views

How to prevent tinymce macro from inserting nbsp;?

I've got the following macro button defined to wrap a selection in a shortcode in the wp_editor visual editor: (function() { tinymce.create('tinymce.plugins.ingredient_name', { init : ...
1
vote
2answers
5k views

How can I stop TinyMCE from converting my HTML entities to characters?

Here's the problem: I paste the HTML entity code for, let's say, a service mark (&#8480;) into the HTML view of the editor. As soon as I switch to the "visual" tab, my entity code is turned into ...
1
vote
1answer
2k views

two tinyMCE editors in the same page

I've used this method to enter the first editor: on functions.php: function add_admin_theme_styles() { wp_enqueue_style('thickbox'); } add_action('admin_print_styles', ...
1
vote
2answers
3k views

Show dialog box in TinyMCE plugin and use WordPress php functions in it

I'm adding a TinyMCE button to my plugin. So far, I've been able to add the button and call my editor_plugin.js file and it's command. Not an easy mission btw... I want this button to show a Dialog ...
0
votes
0answers
54 views

Custom shortcode editor [BackboneJS & TinyMCE)

I'm using Wordpress 3.9.1 and I wrote a custom shortcode that working, but I'd like to custom it a little bit When I use my shortcode, this is the render in the admin page : [toggles ...
0
votes
1answer
204 views

help on wp_editor via ajax load [duplicate]

So I have been spending hours trying to figure out how to make the wp_editor() work on an ajax generated content. I bumped into this post: Load tinyMCE / wp_editor() via AJAX and tried the solution ...
0
votes
3answers
1k views

Adding rich text editor to my plugin

Hello Wordpress users, I'm trying to add a rich text editor to my own plugin. So I googled it first of course and I found serveral answers like: ...
0
votes
1answer
2k views

Using multiple instances of wp_editor in Custom Post Type admin area

I've written a custom plugin for my fishkeeping website which allows users to enter information about a species of tropical fish (i.e. "habitat", "distribution", "locality", etc). Each of these are ...