Stack Exchange Network

Stack Exchange network consists of 174 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

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.

0
votes
0answers
25 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
0answers
15 views

Gallery Previews Not Working - wp.editor JavaScript API

When using media buttons on the wp.editor JavaScript API, The default "Create Gallery" functionality is available. Selection and editing of the gallery is working perfectly fine, however the gallery ...
0
votes
1answer
18 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 ...
0
votes
0answers
9 views

Tooltip Button not showing within WYSIWYG Toolbar

I've been using this code to insert a tooltip button within the WYSIWYG Toolbar in my Wordpress sites but for some reason it has stopped working. I'm wondering if an update to core may have been the ...
1
vote
0answers
13 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
10 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
6 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
61 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
23 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
17 views

WordPress TinyMCE Editor plugin not copying values from input boxes into shortcode. Displaying VALUE=“undefined” for each

I am building a custom plugin on WordPress to insert a [video_embed] shortcode with two attributes ("id" and "border"). The button for the TinyMCE editor that I have created is working but does not ...
0
votes
0answers
16 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
37 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
46 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
31 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
12 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
24 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-...
1
vote
2answers
47 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
20 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. ...
0
votes
0answers
30 views

wp_editor() not working in a widget

I have followed the steps and copied the codes exactly as it written by Ralf912 but it does not work on my WordPress installation. Why Can't wp_editor Be Used in a Custom Widget? I keep receiving ...
1
vote
1answer
31 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
36 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
20 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
17 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 ...
3
votes
1answer
96 views

Integrating inline tinymce editor in a component for a gutenberg block

I'm new to stack exchange. I hope my question is not to long. I want to integrate an inline tinymce editor in a component and use it in a gutenberg block. But my editors ui conflicts with gutenberg. (...
0
votes
0answers
63 views

Add CodeMirror in a custom TinyMCE button

I'm adding a custom button in the TinyMCE that opens a textarea where I can add code. Now since CodeMirror is included in the core, how do I make my textarea into a proper code editor? Currently I ...
0
votes
1answer
33 views

Text View (Code View) in WordPress Customizer TinyMCE Editor

I have implemented TinyMCE Editor in WordPress Customizer by putting this code in functions.php file: // TinyMCE Editor in Customizer if (class_exists('WP_Customize_Control')) { class ...
1
vote
1answer
59 views

Stop WordPress Visual Editor converting backticks into code blocks

I need my frontend wp_editor() to not convert backticks into code automatically. I have checked the settings config in the tiny_mce_before_init filter as well as the documentation on the TinyMCE ...
0
votes
0answers
50 views

TinyMCE function causes issue in AVADA theme

I use Avada Theme 5.5.2 + WP and discover an issue that is caused by the function my_tinymce_setup_function( $initArray ). When using this function it updates correct the into the tables. But in the ...
1
vote
0answers
53 views

How to Add TinyMCE to widget

I'm trying to create simple widget with TinyMCE rich editor but it's not working My widget code: add_action('widgets_init', 'string_example_name_init'); function string_example_name_init() { ...
2
votes
1answer
119 views

TinyMCE custom styles remove class when switching styles

I have added some custom styles to the TinyMCE editor using the tiny_mce_before_init filter hook. They work by adding classes to the block-level element. See the code below: function ...
0
votes
0answers
12 views

Autosave converts HTML entities, removes images from [caption]s

When I allow Wordpress to autosave, it removes certain HTML tags completely (img) while others get modified. Content before autosave: [caption id="attachment_2893068" align="alignnone" width="1200"]&...
1
vote
0answers
39 views

Custom Shortcode: define cursor position/insertion point?

I have created a shortcode and TinyMCE plugin for a shortcode. Click the button, it inserts [my-shortcode][/my-shortcode]. But it adds the code and then the editor cursor is after the closing ...
0
votes
1answer
79 views

WordPress Tinymce editor broken and nothing seems to fix it :(

First off, i've tried stuff posted here already, didnt help. Issue : Here is what i tried Tried renaming htaccess removing all plugins removing and reinstalling theme (there is only one ) tried ...
0
votes
0answers
45 views

TinyMCE adding non breakable space between links

I have a small issue, we are trying to have a hashtag block. Where each hashtag link leads to a different page. However, TinyMCE is adding &nbsp; between each link. Which leads to links not ...
0
votes
1answer
21 views

Changing code with (&nbsp;) when author updates their post (TinyMCE)

I have a problem like this: every save changes code <td></td> to <td>&nbsp;</td> which is terrible beacause I have big tables and it makes final code much bigger and ...
3
votes
0answers
37 views

How can I use the TinyMCE editor for the description field on a Media item?

When I view an image in my Media Library, the Description field textarea has a toolbar, but it's only for creating HTML tags. How can I get the TinyMCE wysywig editor to be used instead? I've found ...
1
vote
0answers
29 views

Asynchronously render shortcodes in TinyMCE visual editor

I created an img shortcode (e.g. [img attachment="19"]) that I want to render in real time in TinyMCE visual editor. So, I created a plugin for TinyMCE that replaces the shortcode in real time. Here ...
0
votes
0answers
12 views

How to prevent tinymce formats from multiselecting?

Is there a way or a setting to prevent this from happening. I tried hooking script like this on footer but it still wont bind to the buttons. add_action( 'wp_footer', function () { echo "<...
1
vote
0answers
33 views

TinyMCE custom plugin, how to make a word automatically selected based on current cursor position?

Making a custom plugin for TinyMCE, I wonder how to make a word automatically selected based on current cursor position, like in the the Wordpress "Add link" plugin. I've searched the WP TinyMCe ...
3
votes
2answers
269 views

Wait for Gutenberg or built something in ACF?

I have a client who has requested something, that's straight out of the box, if I was using ACF. However... Gutenberg should be here any minute now and revolutionize who the editor works. I've looked ...
1
vote
0answers
31 views

Visual editor not showing all table rows

Does anyone know why the visual editor does not show all table rows. I have over 30 rows of data, but in the visual editor only ten are visible, the text editor is the only way to access the rest. ...
2
votes
2answers
82 views

Using a dashicon for a custom button in TinyMCE?

I have created a custom button for TinyMCE and I would like it to use the Twitter icon from dashicons. I am hoping to be able to do this just through the Javascript with no additional CSS. Is this ...
1
vote
1answer
173 views

onClick inside post_content does not appear in post tinymce editor

I'm doing a migration. I made a PHP script to generate posts in the new WordPress database. The post content contains an HTML link containing href="javascript:" and onClick="trackOutboundLink('url')"....
0
votes
0answers
39 views

How to get values from Tinymce visual editor popup?

Hello this is mi first question here I hope I get some answer, since i ve seen lots of unanswered questions. I am making a plugin and I need to save values entered in tinymce button popup. The ...
0
votes
1answer
238 views

Javascript function not working when placed in Text Block

I am trying to include a button that when clicked will copy the text from a textbox to the clipboard. I have placed the following code at the end of my text block (in Text View). Copy the important ...
0
votes
0answers
26 views

Character count instead of word count in tinymce

Is there a way to display character count instead of word count in tinymce editor?
0
votes
0answers
156 views

Understanding automatic text formatting in the Wordpress editor

Why does the text editor remove paragraphs and line breaks? Surely maintaining basic formatting such as paragraphs or line breaks is a basic requirement in all CMS systems. It's hard to believe that ...
1
vote
1answer
136 views

Translate MCE button text/tooltip in custom plugin

I am using a custom MCE button in my wordpress custom plugin below is my code function enqueue_plugin_scripts($plugin_array) { //enqueue TinyMCE plugin script with its ID. $plugin_array["...
0
votes
1answer
43 views

Preserve indentation, HTML5 shorthand in editor

I know there are other questions about tinyMCE, but this one is a little different. Let's say I create an unordered list that drops the closing li tags. I also have class attributes that I don't want ...
1
vote
1answer
340 views

TinyMCE get selected text and underlying HTML

I already have a custom TinyMCE button that returns the selected text using var selected = tinyMCE.activeEditor.selection.getContent(); However, when a user creates a WordPress "link" like this... ....