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

0
votes
1answer
421 views

TinyMCE 4 & wp_editor multiple editor issue

Just updated WordPress to new 3.9, new features are great, love them. Only got some issues with tinyMCE 4. I use wp_editor to create multiple tinyMCE editors with custom field. Here is the code: $...
0
votes
2answers
762 views

Add button in TinyMCE editor to insert text

I'm searching a way to add a custom button to the TinyMCE editor when clicked insert into the visual editor some text. For example: button called "Hi" when clicked insert into the editor "Hello I'm &...
14
votes
3answers
15k 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 ...
8
votes
1answer
107 views

Add self-closing shortcode button to TinyMCE in WP 4.6

I'm familiar with creating self-closing shortcodes like: // shortcode function wpse_shortcode_example( $wpse_atts ) { // Attributes $wpse_atts = shortcode_atts( array( '...
0
votes
2answers
31 views

Open Insert/edit link popup

I'm using visual editor on front end. When clicking the Add/insert link button, it displays following By clicking Link options icon, the following popup appears Is it possible to directly open ...
0
votes
1answer
886 views

Allowing style tag in TinyMCE editor

In cases i want to add individual styles for an element its easy i just add inline styles inside p tags, because _wp_add_global_attributes has style attribute.... but when i want to add tag itslef ...
0
votes
1answer
564 views

Overriding TinyMCE buttons - Justify button shortcodes not working

Problem I'm trying to customise the TinyMCE text editor. Several of the common options for overruling Tiny MCE didn't seem to work for me. So instead I overwrote the functions in my functions file: ...
0
votes
1answer
1k views

How to use WP switchEditors.switchto(this) JS function in your own script?

I have a tab switching theme that lets the user choose 3 editing modes when adding new pages (HTML and Visual- these are WP defaults and the new Syntax mode using Code Mirror). I have issues when ...
-1
votes
0answers
14 views

TinyMCE Error - Text displaying in a single column

Today, I encountered an odd error with TinyMCE after a migration of WordPress from server to server. When I went back to edit a post, the Tiny MCE editor placed each character that I typed on to one ...
0
votes
1answer
2k views

“switchEditors is not defined” with wp_editor() in jQuery UI tabs

Making a WordPress plugin, using WordPress 3.5.2 I'm using wp_editor() on the front end, inside jquery UI tabs [ajax loading tabs + 2 editors on the same panel], and I'm getting the following error, ...
0
votes
1answer
713 views

Customizing tinyMCE 4 Styles and Format dropdowns

As has been pointed out in multiple posts here there are some big problems with tinyMCE 4 formatting for WP 3.9 - this code comes very close: TinyMCE: adding CSS to format dropdown But there are ...
0
votes
1answer
819 views

Easy way to inject js in tinymce iframe?

I was wondering if there is any direct hook to inject some javascript into tinymce iframe?
2
votes
3answers
431 views

How can I control the HTML output of my post?

As you already know, WordPress manipulates posts, even if you write everything in Text mode. (replacing line breaks with \r\n 's , converting single quotes into double quotes etc.) I know this is ...
2
votes
1answer
626 views

Access tinymce from thickbox

Basically, I have a custom tinymce button which opens a thickbox window in iframe mode. Is there a way to access the tinymce from the iframe? Wordpress media uploader seems to do it somehow. Stuff ...
4
votes
2answers
817 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 ...
2
votes
1answer
210 views

How do i disable/disallow <script> and <iframe> tags in TinyMCE?

A client of mine has just had 200 posts injected by malicious scripts and iframes. The website is now all cleared. They were put in the content by the user updating the post/page as my clients ...
-1
votes
1answer
646 views

Issue displaying multiple TinyMCE editors with WPAlchemy

I have a custom post type with a WPAlchemy admin meta box class including multiple textareas with TinyMCE editors(for adding content to the custom post template). I've gotten the editors to display ...
0
votes
0answers
8 views

Tinymce style in Wordpress

I found this code which adds multiple editor boxes which use tinymce to the admin area. I'm trying to find out if it can load with the Wordpress Tinymce styling already in place. Currently it loads ...
5
votes
2answers
2k 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.. &...
5
votes
3answers
911 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 ...
0
votes
0answers
85 views

Issue with iframe in TinyMCE

How does TinyMCE generate an iframe in the WordPress admin panel? Actually, I could not find out the starting point of the iframe which is generated by TinyMCE.
6
votes
2answers
3k views

Uncaught ReferenceError:switchEditors is not defined

Is anyone familiar with this error? It is causing TinyMCE to break in my Wordpress theme. In console it gives me these two errors both seem to originate from wp-admin/post-new.php Uncaught ...
0
votes
1answer
890 views

Make tinymce button have a checkbox that returns a value, instead of true/false

from my understanding the checkbox of the tinymce buttons only return true or false? Is there a way to get a checkbox list? And all the item's values inside the checkbox list that are checked will ...
0
votes
2answers
556 views

Removing the TinyMCE editor for a given page template

I was looking for a way to remove the TinyMCE Editor for a specific page template in a theme (in my case it's page-home.php). I found the following code, which works, however, I was wondering if this ...
1
vote
0answers
15 views

Enable Visual Editor In Comments On CPT Edit Page

I'm trying to adjust the comment form on a custom post type in the admin edit page only. The end result I'm looking for is: Allow switching between Visual and Text editor through the tabs on the top ...
0
votes
0answers
38 views

Highlighting HTML code entered in the text editor

I have a need to have both "rendered" html in a post and "raw" or highlighted html in a Wordpress 4.5.2 post or page. I have solved the former by simply editing in the text editor, placing my code in ...
2
votes
2answers
840 views

TinyMCE Editor removing <p> and <br> and putting &nbsp; instead

Steps for problem reproduction: Open WordPress Admin Dashboard (I use version 3.7); Click on Page > Add Page; On the editor, choose the "HTML" Tab; Write <p>Lorem ipsum dolor sit amet</p>...
0
votes
0answers
21 views

Adding custom styles to a list in TinyMCE

I am currently using this code to add custom styles within TinyMCE: add_action("wp_print_scripts", "cspm_remove_script_files", 100); function wpb_mce_buttons_2($buttons) { array_unshift($buttons, '...
2
votes
1answer
546 views

tinyMCE.activeEditor = null WP editor loaded in 'Text' mode?

I have a plugin which saves data via AJAX, and realised that it wasn't sending out any request. I opened up the console to look further, and low and behold when trying to look at the object tinyMCE....
3
votes
3answers
1k views

How to customize the symbols that appear in the Visual Editor insert custom character

The TinyMCE Editor has a great button in the kitchen sink to insert custom characters / symbols. Is there a way to control what symbols show up in this pop-up? (Specifically I need some unique ...
0
votes
1answer
1k views

How to stop editor removing space (&nbsp;) in the beginning of the paragraph

I use WordPress with TinyMCE in Chinese. It needs double white spaces in the beginning of each paragraph. But the editor will automatically removing all spaces(white space and nbsp; code) in the ...
1
vote
1answer
59 views

Open link in a new tab checked by default when adding a new link in visual post editor

When adding a link in the WP visual post editor you have to click the settings after adding the link and then click the Open link in a new tab to have it add a link with a target in a new window/tab. ...
1
vote
1answer
2k views

Our shortcode dropdown box in Tinymce is not working in WordPress 3.9?

Hi since the new version is about to be released I thought I would download it and see if my theme works still. Everything works great apart from the dropdown box which is now longer showing. Here ...
0
votes
1answer
30 views

tiny_mce_before_init: 'exact' => true has no effect

For a custom theme, the editors want to be able to select three different font sizes in the post editor. I thought about using a standard font size plus defining two extra classes: <p class="...
2
votes
1answer
1k views

White text on white background in TinyMCE when wp_editor is called in WP 3.9

One of the features of my plugin is to add a TinyMCE editor instance inside a meta box on the Edit Post screen. This has worked great up until 3.9 and I'm not clear as to what's going wrong. Here are ...
3
votes
1answer
1k views

TinyMCE popup windows using WP functions

In my editor I would like to use a TinyMCE generated popup to insert in the textarea some complex shortcodes. I use the TinyMCE API to show the popup (bottom of this question). The popup is a PHP file ...
1
vote
0answers
32 views

TinyMCE custom dialog with selectbox not working

For a theme I add a custom menu to Wordpress' TinyMCE using ed.addButton. Now some of those menu points have more or less elaborate options, so I thought I'd use the custom dialog function of TinyMCE ...
2
votes
1answer
43 views

Is it possible to add a repeater field to TinyMCE's option window?

I am trying to create an accordion shortcode builder for WordPress using TinyMCE's editor.addCommand / windowManager.open function. I'd like to be able to add a repeatable region within the popup ...
6
votes
1answer
553 views

Modify links when inserted by WYSIWYG editor

Is there any possibility to hook into the editor of WordPress so that if a link to an internal content is inserted via the WYSIWYG editor the post id of that linked post is added as a data attribute ...
2
votes
0answers
44 views

Dynamically add styles to WP TinyMCE editor

I want to add custom styles to Wordpress using dynamic arrays. My question is how can I add the two arrays to the style_formats array within the 'my_mce_before_init_insert_formats' function ...
0
votes
1answer
28 views

How to add custom 'layout' buttons to wordpress editor?

I'd like to modify the editor by adding some 'layout' buttons. Ideally, I'd like to add the ability to add some html 'partial' by simply clicking a button. This is to help my client to create pre-...
1
vote
2answers
48 views

wp_editor in widget breaks after save (no buttons and visual tab broken)

My goal is to get wp_editor working in a simple widget which the admin can use to add text content on an admin options page. Here we go in wp-admin/widgets.php everything looks sooo good right. ...
-2
votes
1answer
776 views

add button to tinymce

i have the following method to insert a button in Tinymce editor: in funcitons.php: class myclaff { function __construct() { add_action( 'admin_init', array($this, '...
5
votes
0answers
97 views

Why did multiple line breaks stop working in text editor?

# Adds ability to add break tags on posts remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' ); add_filter( 'the_content', 'nl2br' ); add_filter( 'the_excerpt', 'nl2br'...
22
votes
1answer
366 views

Adding Custom Text Patterns in the WP 4.5 Visual Editor

4.5 is out and with it new Text Patterns. I would like to know how to go about adding my own custom patterns. Taking a look at wp-includes/js/tinymce/plugins/wptextpattern/plugin.js it seems pretty ...
0
votes
1answer
93 views

WordPress 4.5 Inline Link Toolbar not working on custom wp_editor instance

I am having an issue with initializing the inline link toolbar in a custom instance of the WP editor. The instance is added in a dynamically loaded modal using the wp_editor function and some ...
1
vote
1answer
75 views

TinyMCE Editor change underline button behavior - u tag instead of span text-decoration underline

As above. I want to change the WordPress Edtior TinyMCE behavior when I click the underline button I want the TinyMCE to wrap my selection with <u></u> tags. Now, I know that the u tag was ...
1
vote
1answer
2k views

Add tinymce dynamically via Javascript

I'm struggling to add dynamically a tinymce textarea. I added a custom meta box which contains a button that should add a tinymce. As I'm on post/page, I guess I don't need to include any scripts ...
1
vote
0answers
54 views

Tinymce.js editor in Chrome?

For 3+ years I had a custom styles menu in my Wordpress editor that I added in functions.php which worked great. Today, I went in to edit a new post, and not only doesn't my menu work, but I cannot ...
0
votes
0answers
13 views

Custom tinyMCE control wrapping wrong

I'm adding a custom button to my visual editor, so that the client doesn't have to manually input shortcode. It's a simple column one. So when you select your text, and click on it, it wraps the ...