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
2
votes
1answer
58 views

Adding image to visual editor popup for shortcode with wp.media and wp.mce: changing image duplicates shortcode

tl;dr: Why does using media manager popup within a TinyMCE popup cause duplications of shortcodes? Is it my code or just the way life is? [Spoiler: It was my code] I've written a small plugin to ...
0
votes
0answers
16 views

Multiple TinyMCE buttons with one js file

when add button, i used: $plugin_array['ghichu2'] = get_template_directory_uri() . '/js/cfx_tinymce.js'; $plugin_array['footnotes'] = get_template_directory_uri() . '/js/cfx_tinymce.js'; I merged ...
0
votes
0answers
23 views

Tinymce in WordPress customizer

I have the TinyMCE editor working on one control in the WordPress customizer. The problem I am having is getting it to work when there is more than one field. I need them to update with the live ...
0
votes
1answer
16 views

HTML formatting issues when switching between editor tabs

In the WordPress admin panel, when switching between the "text" and "visual editor" tabs, my HTML formatting is completely lost. New lines are removed, and paragraph tags are shown ...
1
vote
0answers
18 views

Add css class to dropdown

This is a dropdown with two items. I want to visually give these two items a css style. Is this possible? This is the code I used: (function($) { "use strict"; tinymce....
0
votes
0answers
9 views

custom style frontend editor

Stuck with this for weeks. I cannot add a custom button with a custom style to the frontend tinymce editor. If I register a new custom dropdown in the function.php it works great in the backend editor....
1
vote
1answer
35 views

Using wp_editor tinyMCE in metabox cause form alert on leaving page

Using tinyMCE as wp_editor in a custom post type metabox create an alert when I try to submit or If I want to change location I don't have such behavior using Quicktags, but since TinyMCE is easier ...
1
vote
0answers
16 views

How to use TinyMCE in the quick edit form?

I'm trying to make the description of a post editable - specifically the description of a WooCommerce product, but the issue should apply to any post type. I managed to implement it with a simple ...
1
vote
0answers
10 views

Visual editor issue by having multiple tiny mce editors in a CPT

I have a custom post type in which I have added multiple wysiwyg editors, when I click on visual, the content of the editor (button, text, title) get inside of the wysiwyg editor.. it's odd. It looks ...
0
votes
1answer
20 views

Custom post type editor uses old tinyMCE

It is an old site made before the new block editor arrives. Now it's running WP 5.0.11, and I do not want to make an upgrade right now for various reasons. The default post types are using the new ...
1
vote
2answers
120 views

Tiny MCE-modifications (plugins) stopped working in WordPress 5.6

A while back I stumbled across this post from 2015, that showed how to add Tiny MCE-buttons. It has been working for more than a year. But after the latest WordPress update (to version 5.6) it stopped ...
0
votes
0answers
16 views

Use WordPress Shortcodes in TinyMCE5

I am using Wordpress on my site. I wanted a visual editor on frontend of my site. Gutenburg isnt allowed to be put on frontend, and visual editor looks old, so directly using TinyMCE was the best ...
0
votes
1answer
23 views

Replace text by icon in TinyMCE toolbar

I added TinyMCE in the post comment textarea by adding this into my child theme function.php function rich_text_comment_form( $args ) { ob_start(); wp_editor( '', 'comment', array( '...
0
votes
1answer
118 views

TinyMCE plugin won't work with jQuery 3.5.1 (testing with “Test jQuery Updates”)

since Wordpress seems to be moving towards a long due jQuery update, I began testing a few of my plugins (they're not published, just stuff I use for a few clients' websites) with the "Test ...
0
votes
1answer
20 views

Wordpress 5: prevent link from displaying page title instead of URL

I noticed in one of the updates since wordpress 5 that when I paste in a link to another site it shows the page title as the hyperlink (usually "Home") instead of the URL. I don't want that,...
0
votes
0answers
56 views

tinymce and responsive line-breaks (short words after a period)

With the advent of many different screensizes, manual line ending (not sentence-endings) has become a bit of a guessing/repetitive task. I want to avoid having the first short word of a new sentence ...
0
votes
0answers
25 views

How to add wrapper to custom link button in TinyMCE Editor?

I'm trying to add new link button to TinyMCE editor, like that: get_stylesheet_directory_uri().'/js/tinymce_buttons.js'; function cta_mce_button() { if ( !current_user_can( 'edit_posts' ) &&...
0
votes
0answers
38 views

Generate a custom nested layout by tinymce editor button

I create a new button in TinyMCE editor. And i want that new button of TinyMCE editor will show this below structure as dummy content while I press that button. <div class="table-of-contents-...
0
votes
0answers
10 views

Visual editor adding space to short codes

I have been searching around for people with this problem and solutions to it without luck. As of the latest version of WordPress, it seems that the visual editor has been adding an extra space to a ...
0
votes
0answers
24 views

Visual editor not saving data

I want to replace default html textarea to visual editor. Textarea code: <textarea id="description" value="<?php echo esc_attr( $description ); ?>" name="description&...
0
votes
0answers
13 views

Remove Buddyforms button on tiny mice editor

I have custom post type with tinymice, I installed Buddyforms so the button is added to the top of the tinymice editor to include forms. I'll like to remove it. Please, help with the snippet to remove ...
0
votes
0answers
21 views

TinyMCE custom button with double functionality

How to make a button (TinyMCE, WordPress 4.9) with this functionality (dual functionality). Example: <strong>Some Text</strong> highlight everything and use the button Result: <h2>...
0
votes
0answers
9 views

TinyMCE for custom meta boxes in product variations

How can TinyMCE for custom meta boxes in product variations be enabled? I have added custom text areas for every variation but i like to know if it is possible to convert them into tinymce editor
0
votes
2answers
522 views

TinyMCE on frontend style not working

I use TinyMCE advanced on my Wordpress website. My logged-in users have the ability to fill forms with WYSIWYG fields. I don't understand why some styles are not applied on those fields while it ...
0
votes
0answers
42 views

Tiny MCE image alignment and manual resizing

I'm searching a solution to remove the differents possibilities of alignment of images in TinyMCE editor in Wordpress and remove the manual resizing by mouse. I already done the last one with this in ...
0
votes
0answers
20 views

Wordpress TinyMCE image captions headings not saving on update

If I go to edit a post and I try to set the caption under an image to a heading, it defaults back to paragraph. Does anyone know if it has to do with TinyMCE or is it a wordpress bug? Any input would ...
0
votes
0answers
72 views

How to make “formats” dropdown styles apply to only the selected text?

How can I make the format styles dropdown in the classic editor apply to ONLY the selected text? Right now it is applying to the nearest line break from the selected text, I don't like that. Here is ...
0
votes
0answers
185 views

Adding Wordpress “Add Media” button from Classic Editor to a Custom TinyMCE Textarea

After Gutenburg, Wordpress almost forgot Class Editor, Classic editor runs on a old TinyMCE version. I want to have the newer TinyMCE for my site. But the Add Media Button, from WP editor is also ...
0
votes
0answers
9 views

Visual Editor content disappeared after migration

I migrated all the content from an old website (around 400 posts) and the content is not appearing in either the visual/text editor of a post. It's surprisingly showing the content in the front-end ...
0
votes
0answers
145 views

How to open popup window in block editor with custom buttons?

I am new to wordpress. I want to open a popup from a custom button in the block editor, and return a value to the text being edited. I create the button like this: https://developer.wordpress.org/...
0
votes
0answers
18 views

How to set custom TinyMCE format style as default?

I've created custom TinyMCE formats. In function I have something like this: $style_formats = array( array( 'title' => 'Akapit', 'block' => 'p', 'classes' => 'e-paragraph', ),...
0
votes
0answers
22 views

Error loading wp_editor via ajax in wordpress

I needed help. I'm creating a page external to wordpress and needed to add wp_editor. Here is a simplified example of my code: <? require('../wp-blog-header.php'); define('WP_USE_THEMES', ...
1
vote
1answer
283 views

How to set callback to execute after all the tinyMCE editors have been initialized?

I've loaded a tinyMCE editor using wp_editor function of Wordpress. Now, I want to set value of that editor after it gets initialized. I tried to do it like this: $(function() { tinymce.get(...)....
0
votes
0answers
11 views

Insert tinymce Popup array Gallery

In function i add_filter to mce: function custom_mce_buttons() { if ( get_user_option( 'rich_editing' ) == 'true' ) { add_filter( 'mce_external_plugins', 'custom_tinymce_plugin' ); ...
0
votes
0answers
17 views

Problems when adding button to TinyMCE in wordpress

I need help with the following: When I follow the steps outlined in this answer the button appears in TinyMCE. However, I need to change what it outputs, and no matter what I change it always outputs ...
0
votes
0answers
62 views

Display custom field under image in TinyMCE editor

I have a custom media field called "Source" with the key media_author. I would like to display it under the image in the TinyMCE editor, like the caption field is: The caption field is editable, but ...
0
votes
0answers
105 views

Button to remove a textarea field

I am using WordPress classic editor and putting some text fields into a page manually like this: <input type="text" /> or <textarea rows="2"></textarea> However, it's not clear ...
0
votes
0answers
28 views

Command to render again tinyMCE editor by id

I'm rendering a tinymce editor inside a react app with html passed from wp_editor The editor renders, but I need to switch between the text editor and visual editor to make the editor work. I tried ...
1
vote
1answer
188 views

TinyMCE as comment editor - encoding issues

I've implemented TinyMCE as my comment form on both the front- and back-end, using the below code (sourced from some questions here): // Enable TinyMCE as frontend comment editor for new comments ...
0
votes
0answers
531 views

How to use wp_editor and save its data in wp_posts table

Recently I want to use wp_editor on a custom plugin where i add it inside a form and want to save its data in wp_posts table. So, I have created a new post type car and adds a field with wp_editor ...
0
votes
1answer
598 views

Did Gutenberg block editor change the html in post content during import?

Which HTML is better, pre-Gutenberg or post-Gutenberg? I imported post content from an old and large WP site into a fresh install and new database. Almost 1200 posts along with their meta and related ...
0
votes
1answer
27 views

WordPress removes paragraphs. How to disable this behavior?

For example, this code: <div><p>Some text here</p></div> Becomes formatted as this: <div>Some text here</div> I think that this is MCE related behavior, because ...
0
votes
1answer
271 views

TinyMCE Advanced Link Class List on the main editor

I'm using the plugin TinyMCE Advanced and would like to achive a "link_class_list" to the editor when inserting a link. I tried a hundred things, but can't seem to get this work with the main (content)...
0
votes
1answer
722 views

How do I use jQuery to add the TinyMCE WYSIWYG editor to a textarea?

Using jQuery (as part of a theme or plugin) how can I add the WYSIWYG (TinyMCE) rich text editor to a <textarea>? Specifically, I want to activate it upon certain conditions being met (changes ...
1
vote
1answer
221 views

Limit Block format tags in WordPress wp_editor

I'm working on a custom meta box and i am trying to limit the Block format tag to just P, H3 and H4 tags, i did it this way and not sure why it doesn't display the block format dropdown; wp_editor( $...
1
vote
1answer
125 views

TinyMCE Visual Blocks plugin set Show blocks option for all users

I want the Show blocks feature of the TinyMCE Visual Blocks Plugin to be activated for all users. I can activate the Show blocks feature under the View menu dropdown manually. See picture. This ...
1
vote
0answers
119 views

TinyMCE function: Remove (earlier) added style from the editor

This is a simple code to create a function in the TinyMCE (Advanced) editor. It creates an icon in the toolbar and once you click it some DIV tags will be added into the editor. This works great.. But ...
0
votes
0answers
111 views

Using wp_editor() when not logged stopped working

I've build myself a custom page template. Within this template I'm using the wp_editor() function. Sadly, when I logout now from my wp site and go now to the page I want to see, I'm getting an error ...
1
vote
1answer
2k views

Gutenberg; Rich Text/HTML for Metadata Textarea Control in Back End

I've properly registered a Gutenberg block that consists of a textarea control to store metadata for a post. In the old days, I simply rendered a wp_editor on the edit-form-advanced hook which had ...
2
votes
1answer
456 views

Add table controls with wp_editor minimal editor configuration ('teeny')

I want to add the table controls for wp_editor(tinymce) initiated with teeny=>true. Here is what I have done so far (without success): <?php $tinymce_options = array('plugins' => "table", '...

1
2 3 4 5
14