Questions tagged [tinymce]

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.

Filter by
Sorted by
Tagged with
0
votes
0answers
203 views

Remove MS Word comments from pasted text

Have been looking all over the web for a solution to this but as yet, cannot find anything. When users cut and paste from MS Word doc (where it has comments), these comments make their way into the ...
1
vote
1answer
377 views

What is this: data-wplink-url-error=“true” and why is it added to my links?

WordPress sometimes adds this to links created by the visual inline link editor: data-wplink-url-error="true" Why? What does this do?
0
votes
2answers
580 views

Dynamicaly update field created with wp_editor()

I'm trying to get value of hidden textarea created by wp_editor() or check if anything is typed it, but the problem is that the value is updated on submit, not dynamically. What I need is to validate ...
0
votes
0answers
403 views

TinyMCE how to add css when inputing a text

I am sorry if this has been asked or it is somewhere on the internet but I just couldn't find anything helpful I have a TinyMCE plugin which when clicked shows up a container with a text box and a ...
0
votes
1answer
524 views

Is it possible to disable the image alignment options in the post editor?

By default, when you insert an image into a post, it has some image alignment options (see below). In my theme I want every image to be full width. Of course, it's easy for me to change the front-end ...
2
votes
1answer
299 views

Dynamically adding WYSIWYG to metaboxes

I've created a custom metabox area and need to add the option of multiple metaboxes. So far I found this guide https://jeremyhixon.com/repeating-wordpress-editor/ which works absolutely perfect up ...
0
votes
1answer
602 views

TinyMCE Multiple Custom Classes Selections

I wanted to use some classes inside my WP TinyMCE Editor. I googled some scripts/functions and seems working fine at the beginning. While I am exploring to add more stuff to the script and add style ...
1
vote
1answer
358 views

How to add button in TinyMCE TEENY mode?

I managed to add a button to TinyMCE with this code: add_action ('admin_init', 'my_tinymce_button'); function my_tinymce_button() { if ( current_user_can( 'edit_posts' ) && ...
2
votes
1answer
886 views

How to wrap the content of the main tinyMCE editor with extra tags

I'm on WP 4.6, which has tinyMCE 4. I need to make the contents of my post editor visual tab more WYSIWYG. I'm attaching a CSS file containing my front end styles to the editor using add_editor_style. ...
0
votes
1answer
394 views

TinyMCE custom button retrieve value from custom field

I'm creating a plugin that adds a custom button to the default TinyMCE editor in WordPress admin. The following code builds this simple plugin mkay-tinymce-extra-button.php function ...
1
vote
2answers
816 views

wp-tinymce.php 404

My visual editor isn't working on a site after just launching it to a new server. I assumed a permissions issue, but the file itself is set to 644. I tried 755 on it as well and still no go. The ...
1
vote
0answers
127 views

Add a select option of shortcodes like dropdown in tinymce

I creeate an plugin where users creating own shortcodes. I want to add TinyMce support to users can select and place shortcode where they want. Can anyone gve me good explanation how to do that? I ...
0
votes
1answer
840 views

can't use span or icon tags on when editing visual composer element

I'm using visual composer on a theme and i have a call to action component; this CTA has a tinyMCE element and i'm trying to insert icons from font awesome, but when i insert <span class="icon-">...
0
votes
1answer
107 views

Visual editor popover or placeholder

I am using the tinyMCE visual editor to allow users of my site to submit some content. I would like to layout the guidelines of their post to them (eg: "Be specific, be thorough"). The most obvious ...
0
votes
0answers
585 views

How do I externalize JQuery from my Tinymce Modal Dialog's html and Enqueue the JS File to see JQuery

I am new to plugin coding and have followed John Morris' excellent starter kit tutorial. Everything works great including the JQuery Accordion in the popup modal dialog. I externalized the CSS from ...
2
votes
1answer
1k views

TinyMCE removes iframe attributes width and height

I'm trying to paste a youtube iframe in to the TinyMCE Editor. Now it always removes the width and height attributes when switching from TEXT to visual. Now this is ok if values are empty, but if ...
0
votes
1answer
104 views

TinyMCE not loading in IE8

Yes I know it's 2016 and IE8 is older that my grandma but I have to support it for specific reasons. My TinyMCE is not loading, it is version 4.4.1 in Wordpress 4.6.1 and when loading the Add new ...
0
votes
2answers
2k views

wp_editor - Media uploader button to tinymce

I want to add a button to TinyMCE editor, which opens Media Uploader of WordPress. I have used wp_editor(). Here is my code- $editor = array( 'textarea_name' => 'message', 'media_buttons' =...
0
votes
2answers
336 views

Prevent Black Studio TinyMCE from adding <p> tags when switching from Visual to HTML mode

I'm having a really annoying problem with Black Studio TinyMCE Widget in Wordpress, wherein the plugin always adds paragraph p tags around any text, image, link, object when switching from Visual ...
0
votes
2answers
207 views

Can I Hook Into the TinyMCE Insert/Edit Link Button to Use Shortlink For Post?

The idea here is to be able to use the Link button to search through posts as usual, but, once selected, use the shortlink (with something like wp_get_shortlink();) instead of the permalink: <a ...
0
votes
1answer
635 views

How to force wp excerpt to use br tag?

wp editor was replacing br tag with p tag. not all the solutions here worked. It was causing problem with design. So i disabled wpautop with below code.... remove_filter( 'the_content', 'wpautop' ); ...
-1
votes
1answer
33 views

How can I replace the built in WordPress editor?

I find the default editor included in a new WordPress installation quite clumsy and frustrating. There are a great many other, better HTML editors out there. Is it possible to replace the default with ...
2
votes
1answer
1k views

TinyMCE default link target to “_blank”

I am struggling to change the default_link_target to "_blank". Here is what i have in functions.php: function my_format_TinyMCE( $settings ) { $settings['default_link_target'] = "_blank"; ...
1
vote
0answers
84 views

Open modal when user clicks on span in visual editor

I'm writing a plugin to allow users to insert footnotes in their content. I've added a button to the toolbar with the media_buttons action. It opens a modal for the user to type the footnote, which ...
2
votes
1answer
4k views

Append Font Family in TinyMCE

I'm trying to append font families to whatever prepopulated font formats are already in the dropdown. I could keep a variable of defaults and append to that but I'm trying to make it as dynamic as ...
1
vote
1answer
2k views

Disable TinyMCE Table formatting width/height

Hi there I want to disable automatic formatting of table/td/tr widths and heights in WordPress TinyMCE. I create the table, literally type the data in (not copying it from word or anything like that) ...
2
votes
0answers
102 views

Added custom styles to Visual Editor. Classes are appended and not replaced as intended

Followed several tutorials and have added custom classes in the formats section of the visual editor. The classes used are being appended and not replaced as I had intended. Is there a way to have ...
1
vote
2answers
1k views

Add drop down in wordpress tiny mce editor pop up

So I need to add additional fields in the wordpress tiny mce pop up My current Code (function () { tinymce.PluginManager.add('aptmce_btn', function (editor, url) { editor.addButton('aptmce_btn', ...
0
votes
1answer
271 views

Blank TinyMCE and 404 errors on assets

In the admin section, the visual editor (TinyMCE) has gone blank. Firebug shows a bunch of 404 errors. These files all actually exist but return a 404 when loaded as assets or when I try opening them ...
0
votes
1answer
703 views

Adding microdata using Structured Data Markup Helper HTML

I am trying to add schema microdata to a wordpress website. I have tried to insert some microdata directly in the wp editor (text mode) but every time i save the page it does not save the code. I ...
5
votes
1answer
2k views

wp_editor disable after reaching character count limit

I want to disable input into an instance of wp_editor on the front end. This accurately tracks the number of characters, but allows input after the limit is reached. function my_char_count( $...
0
votes
1answer
56 views

tinymce custom button

I'm building Storefront child theme. I'm trying to add woocommerce shortcodes plugin into the my theme. Button added but can't load translation file. class-wc-shortcodes-admin.php file wc-...
2
votes
0answers
1k views

Using wp_editor in TinyMCE WindowManager dialog

I'm currently writing a plugin that provides an interface for adding shortcodes, very simple dropdown added to the TinyMCE toolbar which opens a TinyMCE dialog box with text fields etc. This is all ...
4
votes
1answer
487 views

Add post class to the TinyMCE iframe?

I want to add styles to editor-style.css, based on the category the current post belongs to. Therefore I would like to add the post classes - using get_post_class() - to the body of the TinyMCE ...
0
votes
1answer
1k views

Sanitizing textarea for wp_insert_post with TinyMCE enabled or disabled

I'm saving a post data from a front end form, where there is a <textarea>. I need to sanitize it properly so that won't be harmful by any kind. The textarea can be a plain text area or, if ...
11
votes
1answer
9k views

How to add “Insert/Edit link” button in custom popup tinymce window?

I need to insert some text in the body of the article, that turns into a "side-tag" by wrapping it inside some div tags with custom classes. I've created a custom button in tinymce that pops up a new ...
11
votes
1answer
1k 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( '...
3
votes
0answers
264 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 ...
1
vote
0answers
430 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 the ...
1
vote
1answer
2k 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. ...
0
votes
1answer
300 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="...
1
vote
1answer
2k 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 ...
3
votes
0answers
197 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
139 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
921 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. When ...
2
votes
1answer
961 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
2answers
1k 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'...
0
votes
1answer
371 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
2k 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
0answers
493 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 ...