Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
1answer
42 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 ...
1
vote
1answer
21 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
vote
0answers
11 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
1answer
32 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
0answers
23 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 ...
0
votes
0answers
27 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,...
0
votes
0answers
12 views

Need to embed Gutenberg editor in my plugin instead the Classic one

I have plugin which can send the letters to the different emails. In this plugin i have Classic Editor (TinyMCE) with which I can write letters. So, I need to embed Gutenberg editor in my plugin ...
0
votes
1answer
34 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 ...
0
votes
0answers
67 views

Add Shortcode inline inside Gutenberg block

In the legacy (classic editor) it was possible to add buttons to the editor toolbar via tinymce API, that will add shortcode at cursor. seems like this is not supported anymore from the tinymce FQA ...
0
votes
0answers
29 views

How can I change TinyMCE's default block format?

I have a particular post type where I want the editor's default format block to be H3. So, when you create a new empty post and begin typing in the editor, the text would automatically default to ...
0
votes
0answers
19 views

How to stop TinyMce from converting image url into <img>?

My TinyMCE Editor automatically turns image URLs into an embedded image. How can I deactivate this behavior and just display the URL instead?
0
votes
1answer
37 views

Load WordPress Editor .css on Front End

This issues seems to have cropped up for me after a recent WordPress udpate (I'm on 4.9.9) as I haven't had issues before. I load wp_editor on the front end using the following code: $argswp = ...
0
votes
0answers
18 views

Paste as plain text but keep the spaces

I use paste_as_text = true to remove all styling from forum posts in the frontend. But this also removes all the leading spaces on each line. Is there a simple way to avoid the latter?
0
votes
1answer
38 views

How can a TinyMCE modal return formatted/visual text?

I am trying to customize the behavior of an editor button in a plugin. On click, it opens a modal where the user can input some text. On confirmation, I want to wrap this text into code tags. But I ...
0
votes
3answers
81 views

Is there a way to get wp_editor (tinymce) content?

I want to get the wp_editor (tinymce) content then find a sentence by specific word with regex. However, have no idea how to get the content When a post is published or updated, the function will get ...
0
votes
0answers
32 views

How to create a TinyMCE dropdown with dynamically generated shortcodes

Is it possible to create a TinyMCE dropdown menu with dynamically generated shortcodes? This is my code for shortcodes: function filter_button_group($atts){ $attributes = shortcode_atts( array( ...
0
votes
0answers
29 views

Calling wp_editor in an iframe

I'm trying to set up a basic classic TinyMCE editor that comes up in an iframe which is loading a PHP file. In the PHP I'm using a require_once on wp-load.php to load WordPress, and even with just a ...
0
votes
1answer
225 views

Failed to load resource: the server responded with a status of 404 (Not Found) admin-ajax.php

Failed to load resource: the server responded with a status of 404 (Not Found) admin-ajax.php while insert image in to post, and when I add custom html widget in to side bar this error will appear....
0
votes
1answer
148 views

wp.editor.initialize does not show the same default toolbar

In a custom post type of my plugin, for the edit post page, there is a WP Editor inside a metabox. In this metabox there is a button to add WP Editors via jQuery and Ajax. I managed to do it but wp....
0
votes
0answers
9 views

How to allow only auto indentation on TinyMCE

I want that Wordpress (or TinyMCE or any plugin) could auto indent my HTML (as switching from Text to Visual does), because I have lots of old posts that I need to edit and they are kind of minified. ...
0
votes
0answers
15 views

Classic TinyMCE messing up only Contributor's HTML

I use a plugin that loads pre-defined HTML for my posts. I don't need the Visual editor, so I've disable it for everybody. Also, I want TinyMCE not to mess with my code. Nothing, no auto formatting ...
0
votes
1answer
31 views

How to disable/enable PHP plugin functionality based on a TinyMCE toggle-button

I am currently working on a plugin which sends WP posts to an user-specified REST API, every time a post is published. The problem: I don't want to send every post, I'd rather like the user to choose ...
0
votes
0answers
58 views

How To Fix White Text And Missing Buttons In WordPress Visual Editor?

To solve this problem, I tried to change the theme, disable all plugins, replace the TinyMCE folder in the wp-includes folder, install TinyMCE Advanced plugin, add the define line (' ...
0
votes
1answer
50 views

Adding attachment custom field metadata to TinyMCE <img> tag

I've successfully added a custom field to the media upload dialog, but now I need (1) this field to be present on the <img> tag on post content whenever an image is inserted, and (2) a way to ...
0
votes
0answers
28 views

Prevent &dollar; from being replaced by $ when switching between HTML and Visual

Scenario: I need to use the html entity &dollar; instead of plain $ in my posts. I use the Wordpress Classic editor. I know that tinyMCE, with good intentions, alters its content when switching ...
0
votes
0answers
100 views

Setting default content when using wp.editor.initialize

I am trying to add default content when I fire wp.editor.initialize(). This is code. wp.editor.initialize( editor_id, { mediaButtons: true, quicktags: true, tinymce: { ...
0
votes
1answer
157 views

How to add table class for tables of TinyMCE advanced wordpress plugin? [closed]

If you want to add a class for tables created using tinyMCE advanced wordpress plugin. Please see my answer.
0
votes
1answer
19 views

Client on iPad accidentally adding <code> tag to posts while writing

A client of mine complains that text gets 'randomly highlighted' when he is writing Wordpress posts on his iPad Pro. He uses the web interface. I got him to stop deleting the 'highlighted' text and ...
0
votes
1answer
21 views

Add custom TinyMCE 4 Button: Is it mandatory to have one JS per button?

I'm editing a Wordpress Plugin, trying to add another button. I had a look to this question (Add custom TinyMCE 4 Button, Usable since WordPress 3.9-beta1). But it doesn't work The JS file: https://...
1
vote
1answer
296 views

Multiple Tinymce/wp_editor in WordPress >4.8

I'm struggling for two days and started here with success: Why Can't wp_editor Be Used in a Custom Widget? I managed to have multiple TMCE on one page (displayed by a widget); all save data ...
0
votes
0answers
28 views

WordPress wp_editor() inside hidden element rendering incorrectly

As part of a plugin I'm currently writing, I need to add multiple WordPress RTEs to the admin screens. Since the main screen has tabs that are handled with JavaScript, some of the editors are inside ...
0
votes
0answers
66 views

Deny php execution in /wp-includes - using .htaccess in /wp-includes VS root folder

Trying to secure my WP site. In an attempt to deny php execution from the wp-includes folder wondering if these two methods are effectively doing the same thing? 1) add new .htaccess file to root of ...
0
votes
1answer
22 views

Show image gallery from a custom field

I have a custom field in a custom post type. The custom field is a tinymce editor and I should echo out what user enters on it. If user enters text it is shown as well but when an image or a gallery ...
1
vote
0answers
27 views

How to edit content before post update

I'm creating a plugin that enables the user to highlight certain words (long words, long sentences etc.) in the TinyMCE Editor. You can see a live version here: https://tekstr.dk/app I'm converting ...
0
votes
0answers
19 views

Bugs after switching TinyMCE code editor to visual editor

I create a new site. I know the WordPress well. But I do not understand what the problem is. I ran into the following problem. When editing pages /posts in code mode – everything works well. After ...
0
votes
0answers
35 views

TinyMCE custom block format won't stay selected in dropdown menu - other buggy behavior

I'm adding a new format to the block formats dropdown (Heading 1, Heading 2, etc.) called "Heading 2 Light". I add this code in functions.php: function theme_tiny_mce_before_init( $init ) { $init[...
0
votes
1answer
236 views

Adding custom block formats to TinyMCE. Everything works until JavaScript error when applying the format

I'm trying to add an item into the block formats dropdown in TinyMCE. I would like to add a format called "Heading 2 Light". In functions.php I add this code: function theme_tiny_mce_before_init( $...
0
votes
2answers
113 views

Remove distraction free mode from teeny editor

I'm trying to remove the distraction free mode button from the editor, but i can't make it disapear. Here is the code im using: add_filter( 'wp_editor_settings', function($settings) { $...
0
votes
0answers
43 views

“Formats” Select Menu in WP Editor doesn't show up with correct colour

I added the Dropdown "Formats" and defined some custom styles. The followed tutorial is in this section https://codex.wordpress.org/TinyMCE_Custom_Styles#Registering_Custom_Styles Everything is ...
3
votes
1answer
181 views

Tiny MCE editor stripping xlink:href parameter from SVG USE tag

I have an inline SVG tag with an embedded <USE> tag. HTML: <ul> <li><svg class="icon-user"><use xlink:href="#icon-user"></use></svg> My Account</li>...
1
vote
0answers
50 views

Popup box when Clicking on Insert into post button in wordpress

I need to show a alert popup on clicking Insert into Post button in Media Library of WordPress, if the selected Image is less than some width and height in Library. Where can I find the onClick event ...
0
votes
1answer
207 views

TinyMCE 4.7.11 - Enable hidden WordPress core plugins? (referencing a wp-includes from plugin.php)

I need a color picker for the visual editor (don't ask, not my idea). I thought the TinyMCE colorpicker plugin was removed in WordPress 3.9. However, I do see site/wp-includes/js/tinymce/plugins/...
2
votes
0answers
69 views

TinyMce in WordPress - Getting the “fullscreen” button to stay on the right when customising button layout

I'm using TinyMce inside WordPress and I have customised the button layout like so: add_filter( 'tiny_mce_before_init', 'blm_format_tiny_mce' ); add_filter( 'mce_buttons', '...
1
vote
0answers
35 views

trigger html cleanup for all posts

So i know that wordpress will auto clean / format html within posts / pages automatically when switching back and forth from text to visual: https://stackoverflow.com/questions/9907757/wordpress-...
2
votes
2answers
386 views

Customising the WordPress TinyMce editor and it's buttons

I'm trying to cutomise the TinyMce editor within WordPress and I took this code from an older WP site I did, but the buttons I have set don't seem to be working, for example, this is what I have: ...
1
vote
1answer
40 views

TinyMCE 4.7.11 custom styles using styleselect - what does the 'attributes' argument do?

I'm writing a plugin to add custom formats to TinyMCE using styleselect. I've scoured the documentation and hundreds of examples covering the inline, block, selector, classes, and wrapper arguments. ...
1
vote
1answer
66 views

How to reset 'Advance' tab on table property?

I want to use bootstrap table in my site without any mess up class, style. I just want to add bootstrap class. I can add these class in table properties general settings as follows: function ...
0
votes
1answer
58 views

Prevent markup being altered when switching between Visual and HTML editors

I've seen this question asked a few times, but none of the solutions have worked for me. Basically, when switching between TinyMCE and the HTML editor, my markup gets ruined. I have a nested list on ...
0
votes
0answers
40 views

How to add common TinyMCE wysiwyg buttons to the text widget

This is for the editor that appears in the Text Widget, not the normal TinyMCE editor that appears in post/page editing. I am designing a custom widget that is pretty much a copy paste of the text ...
0
votes
0answers
73 views

TinyMCE advanced plugin append (not replace) to 'Formats' menu from editor-style.css

I have successfully replaced the 'Formats' menu of TinyMCE advanced plugin by adding editor-styles.css. What I want is to append some styles in the 'Formats' (as neatly categorized in default), not ...