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

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 ...
9
votes
3answers
4k 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 ...
5
votes
1answer
312 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
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
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
1answer
1k 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
491 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
513 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
3answers
3k 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
176 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
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
6k 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 ...
3
votes
1answer
93 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
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
590 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
0answers
24 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
401 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
677 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
1k 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
1answer
84 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
3k 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
219 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
40 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
3k 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
1answer
891 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
2answers
323 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 ...
1
vote
2answers
924 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
286 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
3answers
4k 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 ...
1
vote
2answers
707 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
112 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
350 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
2answers
169 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
269 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
975 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
289 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
373 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
614 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
10 views

How do I prevent the wp_editor from loading outside container?

I'm trying to load the wp_editor on a settings page: <?php //$content = $value->playerBio; $editor_id = 'listingIntro'; ...
1
vote
0answers
25 views

How would I load wp_editor someehere else other than the admin area?

I would like to use the wp_editor in my article page for live blogging, but the tiny mce does not show up. Can someone guide me through this?
1
vote
0answers
109 views

wp_editor loses data, perhaps an html_entity_decode problem?

I have a custom meta box that I created with WP Alchemy. It has two wp_editor fields. These fields are behaving very strangely. If I just type simple text into them, they work just fine. But if I ...
1
vote
1answer
138 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
1answer
145 views

wp_editor not modify html tags of initial content

How can i set the tinyMCE editor in wp_editor to not modify/replace the html tags of the initial content ? I'm loading html content with tags (i know that they are deprecated but i need them) and ...
0
votes
3answers
2k views

How to add editor-style.css styling to wp_editor on front end for comments

How can I apply my own css (to match editor-style.css) to wp_editor being used on the front end for comments? Currently I'm using code from here to enable the visual editor for comments. My actual ...
0
votes
2answers
170 views

Modifying the main editor priority

I want the main WordPress post editor to appear below some of my meta boxes (generated by Advanced Custom Fields). I know there are the add_meta_box() and remove_meta_box() functions, however it'd be ...
0
votes
3answers
724 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 ...
0
votes
1answer
64 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 ...