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

12
votes
6answers
10k 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/> ...
12
votes
2answers
676 views

Switch between Visual and HTML tab freely

So this question has been raised many times under different flags, however I'd like to present a unified thread for an ultimate solution to this issue. In WordPress, by default, when switching back ...
10
votes
4answers
6k views

How do i include tinymce editor in frontend?

I am trying to add tinymce editor in my frontend from where users can post. But no luck so far. Here is the code: PHP: add_action('wp_print_scripts', 'my_enqueue_scripts'); function ...
9
votes
2answers
14k views

How to add a shortcode button to the TinyMCE editor?

How to make any plugin icon in wordpress post? The code I want to insert in plugin code and will appear in post bar [wp-admin/post.php]. Like this image: Output: If I click the icon it ...
9
votes
2answers
7k 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 ...
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 ...
7
votes
3answers
182 views

How to modify image editor dialog options on WordPress?

I am trying to hide the Alignment radio buttons for images uploaded to the post content area, but can't figure out how to add a custom CSS or JS file to the Image Editor dialog. I've successfully ...
6
votes
4answers
535 views

How to add custom CSS (theme option) to TinyMCE?

I'm trying to add custom CSS (set via theme options) to the TinyMCE visual editor in WordPress. On the front end, the theme generates this CSS and outputs it on the wp_head hook. The problem I'm ...
6
votes
2answers
629 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 ...
6
votes
3answers
2k views

Can you add the visual editor to the description field for custom taxonomies?

Can you add the visual editor to the description field for custom taxonomies? It would be nice to have this option available when you edit an entry for a taxonomy be it core or custom.
6
votes
1answer
4k views

Add popup window to TinyMCE buttons

I'm looking for a good tutorial on how to create a popup window with a TinyMce button that would allow the user to select from multiple options, enter text into inputs, etc. I know how to create a ...
6
votes
1answer
96 views

API to trigger prompt on leaving page

I have a proprietary plugin that creates a metabox on the edit-post page. When the data managed by the plugin is edited and the user navigates away then we would like the user to be prompted as ...
6
votes
3answers
5k 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 ...
6
votes
2answers
512 views

How set defaults on wpLink()

With WP 3.2, WordPress maybe has a new function to add Link-Quicktags to the editor. But I found an function to set defaults for the link-button: Take a look at wplink.js Line 278. ...
5
votes
2answers
293 views
+200

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 ...
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 ...
5
votes
1answer
536 views

Hide “Add media”, html editor from tinymce

I have a custom post type which supports editor. (WordPress ver. 3.5) I want to customize the editor for it. Make it readonly Hide "Add Media" button Hide HTML editor Remove status bar showing word ...
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 ...
5
votes
3answers
1k views

Is there a way to add another row to the tinyMCE kitchen sink toggle?

The tinyMCE "kitchen sink" toggle button shows/hides a row of buttons. I have successfully added my row of shortcode buttons to the tinyMCE editor, but I was wondering if there was a way to make my ...
5
votes
1answer
311 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 ...
5
votes
4answers
2k views

No filter of code on switch from html to visual editor, how?

Yes, i have found other questions to this topic, but no have the same topic exactly and no solution for my problem. If you include code inside the html-tab and you switch to the visual mode, then ...
5
votes
2answers
4k 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 ...
5
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 ...
4
votes
2answers
895 views

Add a button to tinyMCE editor on Custom Post Type

How do I go about adding a simple button to tinymce on the default editor area of my new Custom Post Type? I'd like the button, when clicked, to ask for a text value. The script should then lowercase ...
4
votes
5answers
4k views

Remove HTML editor and visual/HTML tabs from TinyMCE

Is it possible to remove the Visual \ HTML tabs from wp_editor and display only the TinyMCE editor? Basically, right now, I'm using wp_editor to display the smallest possible TinyMCE editor I can - ...
4
votes
2answers
1k 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 ...
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 ...
4
votes
1answer
1k views

Custom Tiny MCE button to bring up a custom php popup

I have a tiny MCE button but I'd like to make it open a modal window(like for the spellcheck). How do I go about doing this? tinymce.create('tinymce.plugins.tinyplugin', { init : ...
4
votes
3answers
2k 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 ...
4
votes
2answers
453 views

Is there a hook to put stylesheet and/or JS inside iframes (thickbox or tinyMCE) in admin area

I'm working on my admin area theme and I wanted to make some modifications on the way the thickbox and tinyMCE looks. I could make most of the changes through adding custom stylesheets and JS to my ...
4
votes
1answer
148 views

Numbering sections and block-level elements in wpautop(); Wordpress as CMS for long-form writing;

I am starting to learn how to write plugins for Wordpress. I'm interested in using WP as a CMS for long essays (6000-9000 words or more). My problem is what I call the Kindle problem, which is how do ...
4
votes
2answers
1k views

When switching from html to visual editor the <iframe> tag gets corrupted

I'm trying to embed an iFrame, and because I set up some CSS using responsive design, I wish to NOT have width="" and height="" attributes whatsoever. When I type this into the HTML editor field.. ...
4
votes
2answers
602 views

Replicating the_editor (Media Bar, TinyMCE, Visual/HTML Tabs) functionality without a huge rewrite

I've been pounding my head on the pavement for some time now regarding implementing the_editor functionality outside the post/page/cpt editor and retaining the look and feel of the function without ...
4
votes
1answer
188 views

Saving (Updating) Post / Page Edits With AJAX

One of the major frustrations while editing posts/pages is that after saving, two things happen: The admin page is reloaded, which takes time More importantly, the cursor position is lost If ...
4
votes
1answer
562 views

Markup of oEmbed codes in the editor?

Is there a way to give oEmbed codes a special markup in the visual editor? In my dream implementation you paste an oEmbed-enabled url in the editor, which will then automatically replace it with a ...
3
votes
2answers
512 views

Secure Validation of wp_editor in Theme Options

So I just found this great WPSE thread about security for themes/plugins. It answered most of my questions but it was created before the new wp_editor() function was built. I have two TinyMCE editors ...
3
votes
1answer
942 views

Using wp_editor in shortcode

I am building a plugin for frontend submission. I am using shortcodes API to display the form for content submission, but I am having troubles. The problem is, wp_editor echoe's data, and shortcode ...
3
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 ...
3
votes
2answers
816 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 ...
3
votes
3answers
3k views

Is there a way to prevent the Editor from modifying my HTML

Is there a way to prevent the Visual Editor from modifying my HTML when creating a post or a page? I know it has good intentions in doing what it does, but sometimes I'd prefer it not to touch my ...
3
votes
3answers
424 views

Make fonts.com font work in TinyMCE (iframe referrer issue)

I'm using custom (commercial) fonts in my project. Everything works well in the frontend. I noticed however that, when trying to add this font to the TinyMCE iframe, I get a 403 for the webfonts. The ...
3
votes
1answer
541 views

Tiny MCE not adding p tag when saving theme option

I am adding tinymce edior with new wp_editor() function on theme option page. On submit the theme option sends data to option.php where it saves. But tinymce doesn't seem to convert the line breaks ...
3
votes
2answers
956 views

Using Wordpress' WYSIWYG for comments

I've been trying to set up the comments section of a site I am working on to use the default Wordpress WYSIWYG (TinyMCE). But it's harder than expected. I used this tutorial to take me almost all the ...
3
votes
1answer
750 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 ...
3
votes
1answer
205 views

TinyMCE custom stylesheets for different post types

I use a custom stylesheet for TinyMCE, by placing custom styles in editor-style.css in my theme's directory. I am trying to figure out how to use a different stylesheet depending on what post type we ...
3
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 ...
3
votes
2answers
476 views

How to keep a textarea and stop tinymce?

If I run this code then I no longer get the toolbar but I still get a word count and visual/html tabs and when I save the post my content gets wrapped in <\p> tags. ...
3
votes
2answers
839 views

Use rich text editor in comments?

I've been trying to get the TinyMCE editor working in the comments field but I've been unable to do so. Another suggestion I found was http://nicedit.com, the editor is working but the comments are ...
3
votes
1answer
163 views

Possible to create placeholder images in Wordpress editor that are clickable (should bring up uploader)?

Working on a project where I would like to have buttons within the actual visual editor area where the user can click on the placeholder image and it brings up the upload dialog. I've seen that ...