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

How to apply filters if editing specific template

I am using the following code to add custom styles to the content editor: /* Customize editor */ function mce_mod( $init ) { $style_formats = array ( array( 'title' => 'Gold Heading 1', ...
  • 103
0 votes
1 answer
14 views

WordPress Started Executing Code Inside PRE Tags Even They Are Properly Escaped

Note: I am using https://wordpress.org/plugins/classic-editor/ with latest updated WordPress. I have a Blog at https://www.exeideas.com/ and I share code snippet here also that was working before ...
0 votes
1 answer
43 views

Enqueue MCE Editor CSS in admin page

I am using mce editor for some formatted content. That content is stored in metadata. Now when I render the content it does render the content but the styles for the contents are missing like "...
0 votes
1 answer
23 views

Add custom value for link_class_list for the classic editor

I want to add custom settings to the editor, for which I am using the tiny_mce_before_init filter, as following: function custom_tinymce_settings( $settings ) { $settings['link_class_list'] = ...
0 votes
0 answers
16 views

TinyMCE Visual editor removes href containing Javascript with 'allow_script_urls' set to true

I have made changes to allow Javascript href elements to TinyMCE and it seems to only work when I paste it to the text editor. However, if I try to paste to the visual editor, the href gets removed ...
0 votes
1 answer
91 views

TinyMCE's "Clear Formatting" button doesn't remove lists and headings

Pressing the "Clear Formatting" toolbar button removes styles like bold and italics just fine, but it leaves lists and headings (h1, h2, etc.) as-is. Is there a way to include all elements ...
  • 277
0 votes
0 answers
42 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', ...
0 votes
0 answers
63 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 ...
  • 135
0 votes
1 answer
176 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 ...
0 votes
0 answers
51 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&...
  • 11
0 votes
1 answer
219 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 ...
  • 15
0 votes
0 answers
27 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'); ...
  • 1
1 vote
0 answers
72 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 ...
  • 372
0 votes
0 answers
15 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?...
  • 101
0 votes
1 answer
77 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&...
1 vote
1 answer
209 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 ...
  • 158
0 votes
1 answer
35 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 ...
0 votes
2 answers
375 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 ...
  • 105
2 votes
1 answer
172 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
1 answer
149 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 ...
  • 11
1 vote
0 answers
58 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....
  • 11
1 vote
1 answer
51 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 ...
  • 23
1 vote
0 answers
110 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 ...
  • 111
1 vote
0 answers
18 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
1 answer
127 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
2 answers
330 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 ...
  • 698
0 votes
1 answer
88 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( '...
  • 239
0 votes
1 answer
240 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 ...
  • 65
0 votes
1 answer
112 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,...
  • 293
0 votes
0 answers
107 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
2 answers
2k 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 ...
  • 3
0 votes
0 answers
83 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', ),...
  • 141
1 vote
1 answer
1k 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(...)....
1 vote
1 answer
343 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 ...
  • 31
0 votes
0 answers
815 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 ...
  • 122
0 votes
1 answer
868 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 ...
  • 1
0 votes
1 answer
34 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
1 answer
497 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)...
  • 13
0 votes
1 answer
1k 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
1 answer
496 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
1 answer
252 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
0 answers
236 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 ...
  • 13
0 votes
0 answers
186 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 ...
  • 216
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 ...
  • 343
2 votes
1 answer
986 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", '...
  • 213
2 votes
0 answers
203 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 ...
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 ...
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 ...
  • 698
0 votes
0 answers
66 views

Strange wp-admin problem for all users/adminstrators except the original one?

I don't get this but for all wp admin users except the original main user i get a strange error which causes the visual editor to fail: load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,...
  • 1,114
1 vote
2 answers
758 views

Different css rules for TinyMCE and Gutenberg while using add_editor_style()

I wanted to include some CSS rules inside of my gutenberg editor (in a way that it better reflected the frontend of the website). Yet I absolutely didn't want to see the same styles applied inside of ...
  • 231

1
2 3 4 5
14