The wp_editor() function allows plugin and theme developers to render a custom instance of the TinyMCE editor used by WordPress

learn more… | top users | synonyms

10
votes
2answers
10k 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 ...
10
votes
3answers
5k views

wp_editor textarea value not updating

I am using the *_add_form_fields action to add fields to a custom taxonomy. One of those fields is a wp_editor(). The problem I am facing is that when I output the WordPress editor on the page like ...
7
votes
1answer
994 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
5answers
6k 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 - ...
6
votes
1answer
2k 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 ...
5
votes
2answers
6k 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
2answers
8k views

Post custom metabox textarea using wp_editor

I'm a novice and looking to add the wp_editor to a custom metabox textarea field. I've looked seemingly everywhere for an complete example for writing a metabox with a textarea that uses the ...
4
votes
1answer
2k views

wp_editor() fields on Theme Options Page not saving

(This is sort of a follow-up to this question.) I'm able to display the two WYSIWYG editors on my theme options page, but the values I enter into the editors aren't saved. I've read a ton of stuff ...
4
votes
1answer
625 views

wp_editor with media buttons

I use wp_editor() on the frontend. media_buttons are displayed on default if visitor is logged in. I want to display these media buttons whether user is logged in or not. Is there any way to achieve ...
3
votes
2answers
775 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
4answers
4k views

How to handle multiple instance of “send_to_editor” js function

Here is what I am doing: I Added wordpress media upload with iframe popup when a button or link clicked. And with click of insert into post the image url placed on a textbox. send_to_editor() ...
3
votes
2answers
220 views

Load visual editor without custom styling

I have a plugin that uses the wp_editor() function to load an instance of the TinyMCE editor. However, the editor is affected by custom styling to make it look similar to the theme through the ...
3
votes
1answer
905 views

TinyMCE 4.x : How to customize toolbar on wp_editor()

Since upgrading to Wordpress 3.9 (which includes TinyMCE 4.x), I have problems customizing the editor, displayed via wp_editor() In the example below, I want to disable the 'fullscreen' button, but ...
3
votes
1answer
97 views

Why are there two diffrent full screen editors?

In the WP editor there is a full screen button. It has shortcut ALT+SHIFT+G. When the button is pressed it shows a different full screen editor then when the shortcut is used. I tried this on ...
3
votes
1answer
2k views

wp_editor not adding paragraphs despite wpautop being set to true

I'm using the following code to produce a wp_editor instance: <?php if (version_compare($wp_version, "3.3") >= 0) { ?> <p><?php wp_editor( $answer->post_content, 'answer', ...
3
votes
3answers
6k views

How to load wp_editor() through AJAX/jQuery

I have a theme that is custom developed and really complex. One of the things that I have is multiple content areas where users can specify content for specific tabs. I load multiple instances of ...
3
votes
1answer
641 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
770 views

WP Editor strips input placeholder attribute

Why WP Editor also strips the "placeholder" attribute of the input text element ? Ofcourse, i am using the HTML mode. Here is the input: <input type="text" value="" name="s" style="width: 550px;" ...
3
votes
1answer
298 views

Disable TinyMCE Drag and Drop

I would very much like to disable the drag and drop upload feature for tinyMCE (both the default one and the wp_editor() one) because it interacts with my custom pop up menus - (WP Trac). Right now ...
3
votes
0answers
35 views

How to reinit tinymce for wp_editor after ajax? [duplicate]

Basically if I call wp_editor via ajax it acts funny, I noticed it does not include 2 scripts it DOES include if i call it normally within a form (NOT thru ajax). I found some anwers like tinemce ...
2
votes
2answers
3k 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
2answers
540 views

add_editor_style is not loading in frontend. Any solution?

This is default wordpress add_editor_style function: function add_editor_style( $stylesheet = 'editor-style.css' ) { add_theme_support( 'editor-style' ); if ( ! is_admin() ) return; ...
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 ...
2
votes
1answer
863 views

TinyMCE strips line breaks on mceAddControl

I'm using wp_editor to add wysiwyg fields to admin edit screens. Each wysiwyg lives within a draggable meta box. Since TinyMCE has issues with dragging, I'm using the following code: // on the ...
2
votes
3answers
2k views

Count Words using tinymce in the front-end

i am using a front built in (article directory plugin) tinymce with wp_editor. what ever i tried i cant get the word counter to work automatically.. i can count the words fine in the HTML tab using ...
2
votes
2answers
478 views

TinyMCE Anchor Button not showing

I'm using this filter and function to display a custom, stripped-down version of the TinyMCE editor. Everything works as it should...except the 'Anchor' button will not show ('anchor')? According to ...
2
votes
1answer
92 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 ...
2
votes
1answer
5k 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
1answer
250 views

TinyMCE Plugin Parameter

Can anyone tell me if there is anywhere I can find out what each of these TinyMCE plugins are for? ...
2
votes
0answers
157 views

wp_editor on input changes content

I have a text area using wp_editor On first input it works great. Save via text or visual it saves to mysql just fine this is what is in the text area before I save <a ...
1
vote
3answers
4k views

wp_editor adds HTML entities to the content

I'm building my theme options page and I want to use Wordpress TinyMCE editor here, so I'm calling wp_editor. But when I'm saving data some entities are added to the content for example, lets say I ...
1
vote
3answers
1k views

Why Can't wp_editor Be Used in a Custom Widget?

I've been working on developing a plugin that adds a widget that allows you to edit the content with a wysiwyg editor. I want to use the default wordpress editor by calling wp_editor(). I've seen ...
1
vote
1answer
1k views

Show only oldest post by author

I am working with a heavily customized install of WP. I've set up a specific post type, taxonomy, and roles that gets to use just that post type. Ideally, I'd like to restrict members of that role ...
1
vote
1answer
143 views

Add unique class or ID information to tinyMCE

Is there a method to apply a unique body class ID to the editor in the same way that body class information is added to the published page? I am using the add_editor_style() function to render the ...
1
vote
2answers
1k views

How to customize default wordpress editor?

Good to hear that Sonny (wordpress3.3) has the new editor API wp_editor() that gives us the ability to use multiple instances of the editor in our custom fields with ease. But I needed to customize ...
1
vote
2answers
696 views

Remove specific buttons from wp_editor()

I know there are similar topics with accepted answers but I can't find what I'm looking for. I want to keep only basic buttons in wp_editor(). I'm using this in an option page to make writing more ...
1
vote
2answers
840 views

wp_editor and WPAlchemy messes up tags when updating

when using wp_editor, I paste my text in the visual editor. If I switch to HTML editor, all of my tags are there. So far, no problem. When I update the thing, all of my tags appear in my visual editor ...
1
vote
1answer
508 views

Save wp_editor() content as option

I'm having some troubles with a extra feature i'm writing for my theme. The admin should be able to make some special posts, those posts are stored as an option. The options are atored as an array ...
1
vote
3answers
188 views

How to use MarkDown in a custom textarea field?

I've created a custom metabox with a textarea in it. How would I go about using Markdown in this textarea? I've seen some WP plugins but they seem to only be for the main editor.
1
vote
1answer
502 views

jQuery Validate wp_editor

I have a form, and in the form, I use <?php wp_editor('', 'user_submitted_progress', $settings = array('textarea_name' => 'user_submitted_progress')); ?> to generate a TinyMCE, rather than ...
1
vote
1answer
168 views

Change the name of the wp_editor tab “html/text”

I'm using the German version of WordPress and in wp_editor the two tabs for "visual" and "html" are named "visuell" and "text". I would like to change the "text" tab to "html". Do you know how I can ...
1
vote
2answers
363 views

Custom editor field displaying HTML in Visual editor

I am trying to add a custom WordPress editor field to the General Settings page in the admin. I have it working except that when you save anything with HTML it converts all the code to HTML entities ...
1
vote
1answer
404 views

Updating post content on the front end

I have used the code below to add frontend editing to my posts/pages. How would I go about saving the post content when an update/save button is pressed? $post_id = get_the_ID(); $settings = array( ...
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
1k views

Adding wp_editor to custom metabox

I am adding fields to a custom post type. How can I have editing options in my meta data just as they are in the editor box? add_action('add_meta_boxes', 'add_property'); function add_property(){ ...
1
vote
1answer
323 views

Target wp_editor buttons to add a tooltip

I have a multi-author website and no matter how much education I give to Authors, 80%+ either refuse to or forget to use headings in their posts, instead they use bold text on a separate line to ...
1
vote
1answer
419 views

Using default wordcount javascript in Wordpress on custom wp_editor() areas

I have two wp_editor() instances on pages and posts used to populate the sidebars of my three-column website. I would like to use the default wordpress word-count script on the two wp-editor areas to ...
1
vote
1answer
824 views

Changing the default WP editor font and size

The default font is too small and too narrow. Makes editing a pain. I want the default font to be Lucida 16. I am not talking about a pop up menu. I already have that. When I open a new page/post I ...
1
vote
0answers
48 views

tinymce.get() returns error after ajax request

In the backend, after an event I make an ajax request which populates certain fields. The problematic field is the textarea, for which I use wp_editor like so: <?php $settings = array( ...
1
vote
1answer
87 views

“wp_editor” not displaying TinyMCE correctly when square brackets used in name

I'm creating a custom options page and I have a textarea that I've turned into a TinyMCE editor using wp_editor. TinyMCE displays correctly, however it breaks when I include square brackets in the ...