Skip to main content

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

wp.editor.initialize() breaks when support for 'editor' is added to custom post type

I've a custom post type in a custom plugin. In this post type, I am assigning a meta box field for some fixed hero content. This is just a textarea that I am applying tinymce to. This works well, but ...
Prestosaurus's user avatar
0 votes
0 answers
26 views

How to add button to WYSIWYG to insert shortcode with params (filled in system popup)?

It seems to me that there must be a solution, but I haven't found it. During the theme development process, we create many shortcodes for inserting unusual html layouts into the text. It would be ...
Oleksiy Goldayev's user avatar
2 votes
1 answer
57 views

How to add placeholder in wp_editor?

i would like to add placeholder when using wp_editor() function. I tried to pass placeholder attribute in textarea, but didn't work. I tried to pass it in settings wp_editor( $...
Sak's user avatar
  • 23
0 votes
0 answers
89 views

How to append TinyMCE editor in TinyMCE editor's popup

I'm trying to make a tinyMCE plugin for wordpress. Here is modal window config: editor.windowManager.open( { title: 'Title', body: [ { type: 'textbox', ...
Василий Колов's user avatar
0 votes
1 answer
66 views

Add/remove tools from tinymce

I have added tinymce to a plugin using this code $settings = array( 'text_area_name'=>'the_data', 'tinymce' => true, 'media_buttons' => false, ); wp_editor($initial_data, $id, $settings)...
Steve's user avatar
  • 297
0 votes
0 answers
65 views

wp_editor mce-view

We are using the wp_editor on a page on the front-end to allow subscribers to create a cpt post. We added support for auto-turning youtube urls into embed tags: function mce_scripts() { ...
shanebp's user avatar
  • 5,063
0 votes
0 answers
31 views

TinyMCE - Unable to load the editor in vue front-end plugin page

I have this code in my plugin page that is created using vue 3. I need to use the wordpress editor and I'v used the wp_enqueue_editor() function to load all the needed assets of tinyMCE. in the vue ...
OHICT's user avatar
  • 133
0 votes
0 answers
14 views

How to show metabox in custom php menu page

I've created a custom dashboard for wordpress and I want to show some custom metabox on it. Is there any way to achive this with a filter or function of wordpress? I've tried using the do_meta_boxes() ...
OHICT's user avatar
  • 133
0 votes
0 answers
60 views

How do I modify the TinyMCE editor Add Media button to insert a thumbnail preview of PDFs in addition to a text link?

We're still using TinyMCE as our post editor. When Editors use the 'Add Media' button to select a PDF from the Media Library, they choose the preview image from the Attachment Display Settings at ...
jchwebdev's user avatar
  • 775
0 votes
1 answer
32 views

Should a theme have it's own tinymce address?

A client who is using a theme with a builder has an error showing after the update to 6.3. It's not an error that causes either the site or the dashboard to fail. Instead, it shows in the post content ...
Nora McDougall-Collins's user avatar
0 votes
0 answers
78 views

How to create custom toggle button in tinymce?

I know how to create a basic button with no state. I created two buttons that output custom list styles by outputting ul's with a certain class that is styled in the CSS. But now I would like for the ...
Chris Okwakol's user avatar
0 votes
0 answers
58 views

CSS Styles specific to Admin Sidebar not loading

I have several sites where I have loaded a custom stylesheet for the Admin. They work fine in both the TinyMCE editor and the sidebars. I have one site where the custom stylesheet targets the TinyMCE ...
jchwebdev's user avatar
  • 775
0 votes
0 answers
72 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', ...
Junky's user avatar
  • 103
0 votes
1 answer
43 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 ...
Muhammad Hassan's user avatar
0 votes
1 answer
227 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 "...
MrCoderAndEditor's user avatar
0 votes
1 answer
141 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'] = ...
Álvaro Franz's user avatar
0 votes
1 answer
733 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 ...
Gavin's user avatar
  • 404
0 votes
1 answer
368 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 ...
Vitor Rodrigues's user avatar
0 votes
1 answer
877 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 ...
Kevin's user avatar
  • 15
0 votes
0 answers
52 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'); ...
Kevin's user avatar
  • 1
2 votes
1 answer
244 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 ...
StudioAl's user avatar
  • 464
0 votes
0 answers
16 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?...
sten's user avatar
  • 101
0 votes
1 answer
347 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&...
Husnain Ahmed's user avatar
1 vote
1 answer
333 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 ...
rugbert's user avatar
  • 168
0 votes
1 answer
43 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 ...
bestprogrammerintheworld's user avatar
0 votes
2 answers
932 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 ...
ShrockCo's user avatar
  • 105
2 votes
1 answer
317 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 ...
Andy Macaulay-Brook's user avatar
0 votes
1 answer
292 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 ...
Charles's user avatar
  • 11
1 vote
0 answers
101 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....
Oona's user avatar
  • 11
1 vote
1 answer
72 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 ...
DrK's user avatar
  • 23
1 vote
0 answers
177 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 ...
kolli's user avatar
  • 111
1 vote
0 answers
21 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 ...
DroidPress's user avatar
0 votes
1 answer
333 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 ...
Botond Vajna's user avatar
1 vote
2 answers
482 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 ...
Zeth's user avatar
  • 868
0 votes
1 answer
203 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( '...
dragoweb's user avatar
  • 249
0 votes
1 answer
315 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 ...
Lupus's user avatar
  • 65
0 votes
1 answer
297 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,...
Steve's user avatar
  • 293
0 votes
0 answers
130 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 ...
Rob de Cleen's user avatar
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 ...
AKK's user avatar
  • 3
0 votes
0 answers
137 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', ),...
D_P's user avatar
  • 143
1 vote
1 answer
2k 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(...)....
Krishna Suwal's user avatar
1 vote
1 answer
441 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 ...
Tinstar's user avatar
  • 141
1 vote
0 answers
1k 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 ...
Akash's user avatar
  • 132
0 votes
1 answer
1k 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 ...
Ted's user avatar
  • 1
0 votes
1 answer
65 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 ...
Andrei Pavlenko's user avatar
0 votes
1 answer
753 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)...
Danny's user avatar
  • 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 ...
Matthew Brown aka Lord Matt's user avatar
1 vote
1 answer
737 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( $...
Kolawole Emmanuel Izzy's user avatar
1 vote
1 answer
522 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 ...
Osvald Laurits's user avatar
1 vote
0 answers
341 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 ...
Danny's user avatar
  • 13

1
2 3 4 5
15