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
0 answers
14 views

How to apply padding to TinyMCE editor?

I am using the following in functions.php... function wpdocs_theme_add_editor_styles() { add_editor_style( array( 'https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css', ...
user avatar
0 votes
0 answers
24 views

Equation input with preview in classic editor

I use WordPress as a headless CMS, and my frontend is made with React. There's no theme or live preview. I'm looking for a plugin to add/edit and preview equations (LaTeX) in the classic editor. This ...
user avatar
  • 123
0 votes
1 answer
73 views

How to apply to hide TinyMCE (wp_editor) on button click

I'm not whether this question is a duplicate, and I'm sorry if it is. I have this plugin that works on the admin side. There, I have a page on which I need to print at least one TinyMCE editor. After ...
user avatar
0 votes
0 answers
22 views

TinyMCE strips off the href tag inside span, if i change from text to visual

As mentioned in the title, the TinyMCE editor of WordPress cuts off the href tag that I have inside the span tag. Below is the code i use <h5> <a href="#" target="_blank&...
user avatar
  • 11
0 votes
1 answer
27 views

Adding a Media Button to the WordPress Content Editor

So i'm trying to add a button over the text editor which on pressed lets the user paste in a youtube link which is then covered in shortcode something like this [code]youtube.com[/code]. Following ...
user avatar
  • 13
0 votes
0 answers
20 views

Wordpres Tinymce custom button (Gavick guide)

I'm trying to adda custom button to my editor following this guide Can't get it to work. I've added the following code to my funcitons.php add_action('admin_head', 'gavickpro_add_my_tc_button'); ...
user avatar
  • 1
0 votes
0 answers
8 views

Order buttons added to TinyMCE

Code: https://dpaste.org/PPBY I add buttons to TinyMCE editor with QTags.addButton. Docs: https://codex.wordpress.org/Quicktags_API Problem: the order seems to be distorted. Yellow buttons are added ...
user avatar
  • 101
0 votes
0 answers
13 views

'QTags.addButton: arg2 distorts the button rather than just shows

This is about adding button to Text tab in when a post is editing. In other words, this is about Tinymice. function _get_timeline() { $script = 'QTags.addButton( id="timeline", display=...
user avatar
  • 101
0 votes
0 answers
23 views

How to hide the cell properties and row properties in TinyMCE WordPress?

I've added a table button from the TinyMCE archive to the editor. I'm looking at the Tiny Doc to customize it, but I can't figure out how to hide the property from the menu. Is there any way to ...
user avatar
  • 1
0 votes
0 answers
21 views

Loading a self-hosted custom @font-face into TinyMCE dropdowns (Classic Editor) via 'tiny_mce_before_init' filter

I can't work out how to load self-hosted custom fonts for preview in the font_formats and 'style_formats` dropdown in TinyMCE (Classic Editor). TinyMCE documentation shows this example for loading a ...
user avatar
  • 362
0 votes
0 answers
14 views

TinyMCE is inactive after installation

Installed TinyMCE, but still getting this toolbar : https://ps.w.org/tinymce-advanced/assets/screenshot-1.jpg?rev=2390186 instead of this : https://ps.w.org/tinymce-advanced/assets/screenshot-4.jpg?...
user avatar
  • 101
0 votes
0 answers
14 views

Wordpress, tinymce, how get the link text from dialog?

I want to have the link text what user types here: but I can't seem to figure out it how. First, I need an action before this dialog is closed. Second, I need to read the actual value. Any ideas how?
user avatar
0 votes
0 answers
7 views

clasic editor - article categories customization?

I notice when editing an article (using classic editor), the article categories puts the checkbox and check for the articles category at the top of the list. Is there a way I can configure it to keep ...
user avatar
0 votes
1 answer
17 views

Multiple TinyMCE on button click is initialized and appended but why only last one is writeable?

I am using a button click to add TinyMCE dynamically. Everything is working except only one issue is that only the last one is writeable. Below is my HTML HTML <div id='add_content_box'></div&...
user avatar
1 vote
1 answer
164 views

Gutenberg - button to parse and format all blocks?

The site I've inherited relies heavily on TinyMCE custom menu buttons and shortcodes, but I think its time for the site to move beyond TinyMCE and shortcodes. Our site's TinyMCE customization is a ...
user avatar
  • 148
0 votes
0 answers
29 views

Keyboard shortcuts with TinyMCE custom styles in Wordpress - possible?

I’ve defined some custom styles as directed in the article here, they work splendidly: https://codex.wordpress.org/TinyMCE_Custom_Styles However, I’d like to add keyboard shortcuts for these styles, ...
user avatar
  • 1
0 votes
0 answers
19 views

Can I present different TinyMCE toolbars to users with different roles?

I'd like to be able to offer different TinyMCE editor toolbars to different users, based on their roles, much like Drupal does. For instance, admins might have a large number of tools to click on, ...
user avatar
0 votes
0 answers
10 views

Index of /wp-includes/js/tinymce/utils

Seeing " Index of /wp-includes/js/tinymce/utils " these types of pages in Google indexed pages .. When I search "site:url " , these types of pages are appearing. How can I solve ...
user avatar
  • 1
0 votes
1 answer
32 views

Is there a way to grab the current value of the editor in Gutenburg/Classic Wordpress editor? (Not the saved value of the post!)

I'm trying to make my plugin "Gutenburg - compatible". I have some issues when replacing the editors contents. Before I could just change value by using #content but with Gutenburg there's ...
user avatar
0 votes
2 answers
178 views

How can I set the height of the classic editor per post-type?

Can't seem to find any valuable info on this at the moment - I just want to resize the height of the classic editor field for my Custom Post types. I was hoping to just drop a function or code snippet ...
user avatar
  • 105
2 votes
1 answer
139 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 ...
user avatar
0 votes
1 answer
102 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 ...
user avatar
  • 11
1 vote
0 answers
34 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....
user avatar
  • 11
1 vote
1 answer
45 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 ...
user avatar
  • 23
1 vote
0 answers
81 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 ...
user avatar
  • 111
1 vote
0 answers
17 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 ...
user avatar
0 votes
1 answer
67 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 ...
user avatar
1 vote
2 answers
283 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 ...
user avatar
  • 598
0 votes
1 answer
67 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( '...
user avatar
  • 229
0 votes
1 answer
216 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 ...
user avatar
  • 65
0 votes
1 answer
74 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,...
user avatar
  • 293
0 votes
0 answers
98 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 ...
user avatar
0 votes
2 answers
1k 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 ...
user avatar
  • 3
0 votes
0 answers
63 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', ),...
user avatar
  • 141
1 vote
1 answer
796 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(...)....
user avatar
1 vote
1 answer
298 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 ...
user avatar
  • 31
0 votes
0 answers
756 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 ...
user avatar
  • 122
0 votes
1 answer
812 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 ...
user avatar
  • 1
0 votes
1 answer
32 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 ...
user avatar
0 votes
1 answer
410 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)...
user avatar
  • 13
0 votes
1 answer
974 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 ...
user avatar
1 vote
1 answer
402 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( $...
user avatar
1 vote
1 answer
202 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 ...
user avatar
  • 123
1 vote
0 answers
199 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 ...
user avatar
  • 13
0 votes
0 answers
172 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 ...
user avatar
  • 195
1 vote
1 answer
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 ...
user avatar
  • 343
2 votes
1 answer
813 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", '...
user avatar
  • 213
2 votes
0 answers
177 views

TinyMCE Editor as component in Gutenberg Block

I'm trying to set up a custom block that uses a TinyMCE as the text editable component, rather than using RichEditor. I can't find anything that really details how to go about this and need pointing ...
user avatar
0 votes
1 answer
3k views

How to disable TinyMce's Paste plugin from turning image URLs into embedded <img>?

TinyMCE's Paste plugin automatically turns pasted image URLs into embedded images. https://www.tiny.cloud/docs/plugins/paste/ I need to disable this behavior since I use TinyMCE in a forum on the ...
user avatar
0 votes
0 answers
2k views

Error in backend: Failed to load plugin: tabfocus from url

I'm getting an error that looks really wierd (notice the red error, running all the way down from top to bottom, over the left sidebar): The error is: Failed to load plugin: wordPress from url ...
user avatar
  • 598

1
2 3 4 5
14