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

1
vote
2answers
784 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 ...
0
votes
2answers
479 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 ...
0
votes
1answer
1k 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
17 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
7 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 ...
4
votes
1answer
3k 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
0answers
17 views

Can I add category list in wordpress TinyMCE custom button

I want to create a custom post type gallery plugin.I already create shortcode and create TinyMCE button But I can't add Taxonomies list in TinyMCE-button.js file. how can I add this? my code is php ...
0
votes
1answer
24 views

Visual editor removes <a> tags [on hold]

I have a weird problem: When I edit post using the text editor and insert links, everything works fine, but when I switch to the visual editor and switch back to the text editor, all the <a> ...
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 ...
0
votes
1answer
506 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
743 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 ...
9
votes
0answers
70 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 ...
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
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
2answers
670 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 ...
5
votes
2answers
2k 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
662 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
629 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 ...
2
votes
1answer
102 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 ...
0
votes
0answers
15 views

Grabbing post content in real time with javascript

I am working on a plugin that adds a metabox on the create/edit post page, in that metabox I want a dropdown with all the anchor texts for the a tags used in the post. I haven't done the parser to ...
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 ...
11
votes
2answers
2k 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 ...
0
votes
0answers
28 views

Stop TinyMCE removing empty block level elements

I'm currently trying to write a plugin for TinyMCE that takes advantage of bootstrap's grid system. It's going well for the most part, but I'm having a problem with the editor removing columns when ...
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
741 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 ...
2
votes
1answer
478 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 ...
14
votes
4answers
14k 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 ...
0
votes
0answers
27 views

Adding a wp_editor to a modal, edit gallery button not displaying?

I've initialized a wp_editor via ajax with quick tags within a wp-media modal, and everything seems to be working great. However If I try and edit a gallery within the modal by clicking it nothing ...
0
votes
0answers
24 views

Create a tinyMCE custom button that opens a Bootstrap Modal window instead of the tinyMCE default

I have successfully created a custom button that opens a pop-up which works by opening the native tinyMCE modal window. Following the instructions in the "Adding popup after clicking" section of ...
1
vote
2answers
86 views

P̶l̶a̶c̶e̶h̶o̶l̶d̶e̶r̶ *Default* content in Custom Post Type TinyMCE editor

I know you can customize the placeholder default text of the 'Post Title' field, but is there any way to display placeholder content in the actual TinyMCE post editor? Ideally I'd like to display ...
2
votes
2answers
736 views

Change padding to text indent in “Increase indent” TinyMCE

If you click "Increase indent" in the visual editor it adds the following code into the text editor: <p style="padding-left:30px;"> How to change it to text-indent: 30px; not affecting the ...
1
vote
2answers
33 views

Is there a way to remove the default css from TinyMCE?

I'm working on getting the editor to look more like the front end by adding extra CSS to the TinyMCE rich text editor. WordPress adds /wp-includes/js/tinymce/skins/lightgray/content.min.css and ...
0
votes
1answer
34 views

How to modify VisualComposer's TinyMCE editor only for a specific shortcode

I spent a lot of time looking for how to modify the buttons of a TinyMCE editor for a Visual Composer plugin that I'm developing. My requirement was to modify which buttons are shown, but only in the ...
0
votes
0answers
37 views

wp_editor link to existing content removal

I'm using the wp_editor() on the frontend of my website which will be accessible to users. When I click the insert/edit link option, there is a toggle which says: Link to existing content Which ...
0
votes
0answers
15 views

How to select many posts from tinyMCE PluginManager

I am trying to create a plugin that allows authors to include (inline) recommended posts. I've created a tinyMCE button and I get the form where the user is supposed to select posts to include (max ...
0
votes
0answers
47 views

TinyMCE Button with Dynamic Content

Not sure if this is going to be deemed as off topic, but here goes... My WP plugin adds a new button to the TinyMCE editor. All works fine, my button appears and behaves as expected rendering all of ...
1
vote
1answer
39 views

accessing wp.media api from a tinymce plugin

I'm trying to create a tinymce plugin that generates a shortcode containing two image ids: [image-fade old="xx" new="yy"] I would like to let users select images directly from the media selector ...
1
vote
5answers
2k views

wordpress 3.5 tinymce height

I've just upgraded wordpress to 3.5 version and I noticed that TinyMCE Advanced Editor is not as tall as before. How can I change default tinyMCE height? UPDATE This is the screenshot of section I ...
4
votes
3answers
6k views

Using TinyMce with textareas in meta boxes on custom post types

I am trying to use the http://www.tinymce.com/ plugin to add a tinymce to my textareas in my meta boxes I have created. I've googled other ways and either I cant get it to work or didnt grasp the ...
0
votes
1answer
34 views

wp_editor customization

I've been stuck in a simple issue for the last couple of hours: I'm developing a website in which I use several wp_editor instances, all with custom buttons and styles. This is very simple to achieve ...
0
votes
0answers
27 views

TinyMCE custom button on post-new.php screen

Iam building a small slideshow plugin. For this I registered a new post-type which is called "prfx_slide". And also set-up a shortcode function so that I can use the slider as a shortcode. With the ...
0
votes
0answers
17 views

Bake-in TinyMCE Advanced into theme?

Looking to bake-in the TinyMCE Advanced editor into my theme automatically without using the plugin. Can this be done or is this outside of the scope of what a hook can do within WordPress? I have no ...
1
vote
0answers
48 views

Custom styles dropdown in TinyMCE editor - not working with headings

I've added a custom style dropdown to the TinyMCE editor, but cannot get it to work with headings (h1, h2, etc..). I highlight plain text, select the style from the formats dropdown, and the text does ...
1
vote
2answers
178 views

Insert dynamic listbox options in Tinymce popup editor

I am trying to create dynamic listbox values but getting this error in console: Uncaught TypeError: Cannot assign to read only property 'active' of [ Here's my code( pasting only the code for listbox ...
0
votes
1answer
436 views

Insert media button will always add into the same tinyMCE editor

I have an issue with the insert-media button. I have 2 instances of tinyMCE with both Add Media button. When I add a media in one of the two tinyMCE, all my media will go in this after, whatever which ...
1
vote
1answer
38 views

How to disable formatting

Everytime I copy something, Wordpress will format the content like it was in that text. For example if I copy a link from Wikipedia, Wordpress will format that word to be bold, blue and with ...
0
votes
0answers
31 views

How to have html in TinyMce “Text” tab properly indented and highlighted

Is there a way to have the "Text" tab of tinyMce display a properly indented and highlighted/formatted HTML? Is there any solution to achieve this?
2
votes
1answer
141 views

TinyMCE editor is breaking my beautiful HTML

This is pretty much an exact duplicate of: How to make Wordpress and TinyMCE accept <a> tags wrapping block-level elements as allowed in HTML5? and HTML5, WordPress and Tiny MCE issue - wrapping ...
3
votes
1answer
86 views

Detect a focus on wp_editor

I wan't to detect/callback when a wp_editor(..) output text-area/content-editable is focus. Quite a simple question that I could not find anywhere. <div class="compose-body"> <?php ...
1
vote
0answers
91 views

Setting TinyMCE Content in wp_editor

I am currently coding on front-end editing in wordpress. The outcome should be evernote-like editing using wordpress posts. The Wordpress database stores markup without paragraphs and adds them on ...