Tagged Questions

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
19 views

Output html source tags inside shortcode

I have made a custom popup tiny mce button to add source code.This put shortcode like this [source] <h1>Hi</h1> [/source] To capture output I used function caption_shortcode( $atts, ...
0
votes
1answer
9 views

TinyMCE HTML Encode Backslash

so my question is similar to the one found here, following the example there i am trying to force Tiny MCE to encode backslashes...... currently all i am doing to test this is setting a break point ...
0
votes
1answer
27 views

Keyup events in tinymce editor not working

I am trying to develop a plugin, that shows on the page/post edit page. What I need to do, is detect when the content area changes. Either in visual mode, or text more. I would like to use a keyup ...
1
vote
0answers
16 views

Is it possible to re-use the image details popup?

I want to extend my image field in my widget with an 'edit image details' button. Is it possible in some way to re-use the popup from the tinyMCE editor? So i can use the size settings for example. ...
0
votes
0answers
18 views

Shortcode from admin textarea to page

I've added shortcode to a page via a custom textarea in my Wordpress admin, but the shortcode is seen as text and gets wrapped in quotation marks, so it doesn't work. This is basically how I ...
0
votes
2answers
18 views

Is it better practice to create many page templates, or a a few base templates with custom HTML added via TinyMCE?

I have been teetering back and forth on this question for a while and after a recent battle with TinyMCE, I wanted to get some input. If I am creating very different pages with unique javascript ...
0
votes
1answer
65 views

Creating a custom MCE view for your shortcodes [closed]

How to create a custom MCE view of my own WordPress shortcode?
0
votes
1answer
46 views

Getting shortcode attribute values and shortcode content with JavaScript regex

This is an example shortcode: [boutique_banner title="Loyalty Program:" link="More" linkhref="/"]Earn 1 point for every $5 spent[/boutique_banner] I have created a custom mce view to display this ...
0
votes
0answers
15 views

MCE Editor button to list posts and return their ID

So you know how in the editor, if you highlight some text and click the link button (chain) you can either enter in a URL or select a post from wordpress it self? And clicking submit would wrap the ...
0
votes
1answer
45 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
0answers
25 views

Trouble adding tiny mce to textarea in custom plugin

I'm using the Sunrise open-source OOP framework to develop my plugin. I am building out a new settings page and I'm having trouble adding in a WYSIWYG/tiny MCE textarea to the settings page. I've ...
0
votes
0answers
21 views

Filter html of WordPress editor in visual mode only

1 down vote favorite I have done a lot of Googling , but have not been able to figure this out yet. I have used a function in a plugin I am creating that swaps out the file url of any image inserted ...
0
votes
0answers
54 views

WP_EDITOR on Frontend in bootstrap modal doesnt work properly

im stacked on one problem. in my plugin, i open a bootstrap modal and inside it i want to display the defaul WP editor, called by the function wp_editor(). What i get is the textarea with buttons and ...
0
votes
0answers
44 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 ...
0
votes
0answers
7 views

How to add an image uploader to shortcode generator?

Creating a quote shortcode which requires an image. I managed to find shortcode generator tutorials which inserts simple stuff like tabs, columns or just quotes without images. How do I add and use ...
0
votes
0answers
30 views

TinyMCE Format Dropdown as a Class Toggle

I'm developing a WP site that has 2 button styles that can be placed inside the Content Editor. So far I've been able to add classes as custom styles in the Format dropdown, but when I use that, it ...
0
votes
1answer
28 views

Generate Own Custom CSS Button with icon

I recently changed my WordPress theme and noticed that all the buttons in previous theme are gone and are now looking like this on my new theme: [button link="http://.....com" style="download" ...
0
votes
0answers
59 views

Editor/TinyMCE - change double enter key to <br /> and single enter to nothing

I have learned over the last year on Stack Overflow that people here prefer I give all details in the beginning instead of answering 12 comments worth of this stuff later. EDIT: If you don't want to ...
0
votes
0answers
24 views

Why am I able to add a “formats” dropdown, but the style isn't applied?

I've created style called "smalltext" so the user can specify a paragraph with smaller text to match the theme where needed: add_filter( 'mce_buttons_2', 'my_mce_buttons_2' ); function ...
0
votes
0answers
44 views

How to add the wp-media-library button in tinymce?

That is a screenshot from the admin backend for the the tinymce editor in fullscreen view. I am implementing the editor in the frontend and I want to add the wp media library button in the default ...
0
votes
1answer
18 views

How to edit blockquote image

I'm using TinyMCE Advanced, to show more options to edit text. When I use the blockquote, an image appear, like this: How can I change this?
2
votes
1answer
85 views

Text cut off after the character 𪇆 in TinyMCE

I use the latest version of wordpress (v3.9.2, Taiwan Chinese Traditional), and found it can not display this Chinese word 𪇆, but other Chinese words can be displayed normally. I just use this word ...
0
votes
0answers
102 views

Inline Editing with wp_editor and tinymce (problem with textarea)

I want to use the new inline editing from tinymce with the wp_editor function in wordpress. Here is some info on how to set up tinymce inline editing http://www.tinymce.com/tryit/inline.php The code ...
0
votes
0answers
68 views

How to make Wordpress and TinyMCE accept <a> tags wrapping block-level elements as allowed in HTML5?

Starting with version 5 the HTML standard allows <a> tags wrap block-level elements. On a specific page I need to wrap a heading and an image with an <a> tag: Some intro text. ...
1
vote
0answers
86 views

Possible to stop Wordpress from adding p1, p2… classes to p tags in TinyMCE?

I've noticed the first time today that WP is adding numbered class names (p1,p2…) to my p tags. I have the following TinyMCE init related part in the functions.php. function my_mce( $init ) { ...
0
votes
0answers
162 views

TinyMCE - TypeError: r is undefined

With the latest pgrade of wordpress tinyMCE was upgraded. This resulted in my custom plugin being rendered useless with deprecated calls. I was able correctly format the event handling and now I am ...
0
votes
0answers
153 views

TinyMCE errors after 3.7.1 to 3.9.1 upgrade

After updating from 3.7.1 to 3.9.1 I am seeing issues with the editor within WordPress. In the environment that I have not upgraded, I am able to add content blocks and edit the block type flawlessly. ...
0
votes
1answer
80 views

TinyMCE editor - new lines not rendered on front end

I've been working with a plugin making various tweaks and adding additional functionality. It uses custom post type to create a page with an associated download. In the admin area which allows you to ...
0
votes
1answer
40 views

Make Textarea a TinyMCE (editor box)

Ive picked up an old plugin and am needing to enhance it for my clients specific needs. In the admin section there is a text area used to add info about a download (essentially a custom post type). ...
1
vote
1answer
77 views

Editor stripping out data attribute when saving

I am on the Text version of the page editor on the backend and whenever I try to use something like <div data-100="1500"></div> and click the update button the data section is stripped out ...
0
votes
1answer
44 views

How do I add multiple buttons to Tiny MCE in a single plugin?

I'm using a custom plugin to add custom buttons to my visual editor. Right now, I've followed this tutorial and added a "code" button, but I'd also like to add a "cite" button that wraps the selected ...
0
votes
1answer
46 views

Why does my visual post editor break when I try to add a TinyMCE button?

I'm trying to add a button to my TinyMCE editor. I'm using WordPress 3.9.1, so I'm following this tutorial to add a new TinyMCE button. Right now, I'm just trying to get the tutorial version ...
0
votes
1answer
53 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: ...
2
votes
2answers
259 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 ...
1
vote
1answer
66 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 ...
0
votes
1answer
189 views

How to keep &nbsp; non-breaking spaces in the visual editor?

I often add &nbsp; between connecting words so they break down together to a new line in important text. Switching to visual tab then back to text tab removes these. What can I do to keep them and ...
0
votes
1answer
64 views

tinymce modal and I18n strings methods

Im working on a plugin that loads a tinyMCE modal. As many who know this normally involves opening a static html or even php file. The problem I've run into, is that I would like to translate using ...
0
votes
0answers
131 views

Show Custom Post id in shortcode button on tinymice editor

I have created a custom post Testimonial for my custom theme and i have to display posts using shortcode , i want a shortcode button on tinymice editor so i create a js file for shortcode button Here ...
0
votes
0answers
85 views

TinyMCE Add Media drag and drop

I am trying to use TinyMCE editor in custom page in wp admin "Settings" area. I am able to load it using wp_editor() with drag_drop_upload and media_buttons enabled. It loaded well. But the problem is ...
0
votes
1answer
75 views

Preserve shortcode content formatting

How can I preserve the formatting of the content within a shortcode block when I switch back and forth between the visual and text editor in TinyMCE? As in, the stuff between [myshortcode] and ...
0
votes
0answers
44 views

Remove are you sure dialog from editor

I'm trying to stop the "Are you sure" dialog from appearing on a custom post type. I've tried the suggestions over on this question and this one but they are two and three years old respectively so ...
0
votes
0answers
98 views

How can I enable Visual and Text tabs in a front end implementation of TinyMCE?

I have a plugin that uses TinyMCE for front end entry of content by users. However, the Text / Visual tabs are not available, and I'm not sure how to make them available. Here is the code from the ...
0
votes
0answers
76 views

Custom buttons (with icon) disappearing if saved in TinyMCE visual mode

I'm using custon social buttons in the latest version of Wordpress. The buttons are based on Bootstrap 3 with Font-Awesome icons. The code for the buttons with icons looks like this: <button ...
0
votes
0answers
22 views

Custom admin TinyMCE - order items

I would like to know, how can we order wordpress editor buttons? I want to add the "format/style" dropdown after the heading dropdown. Here is my code: function enable_style_dropdown($buttons) { ...
1
vote
1answer
79 views

More than one TinyMCE (wp_editor) with different $settings['drag_drop_upload'] values breaks

It appears that when I have two+ separate wp_editors with different values for drag_drop_upload they all are built as if they have drag_drop_upload set to true. If I set them all to false they act ...
1
vote
1answer
50 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
1answer
586 views

How do i use fontawesome icons in TinyMce editor?

I'm trying to add a youtube button in TinyMce editor. here is a recent-posts.js file which is in the js folder of the theme directory. (function() { tinymce.create('tinymce.plugins.buttons', { ...
0
votes
0answers
42 views

How to add tinymce to normal textareas (in wordpress admin)?

I have custom post type called coupon and custom taxanomy stores. At this page edit-tags.php?taxonomy=stores&post_type=coupon meaning while adding and editing stores I have a field called ...
2
votes
1answer
671 views

How to get a jQuery script to run on a page?

I am having a hard time figuring out how to get a jQuery script to run on a Wordpress page of mine the "correct" way. I have followed this article and implemented what the first answer says to do. ...
1
vote
2answers
55 views

Adding custom styles to elements, without creating new elements

So Im using the tiny_mce_before_init filter to added a few classes to the wp_editor and am getting unexpected results. I havent used this before, but from what Im reading and what my peers tell me I ...