Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
1
vote
0answers
410 views

Add buttons to the new TinyMCE WP Editor. Javascript API

I've added more buttons to a TinyMCE instance using the new Javascript API available since WordPress version 4.8. As you can see in the following code block, I could add more buttons but I'm not ...
1
vote
0answers
242 views

Avoid glitchy characters - my own version of the problem

I am having a problem with how WP handles content in the Visual vs. Text editor views. This has been very thoroughly discussed here and here, but my situation is not quite addressed: If I enter a ...
1
vote
0answers
534 views

TinyMCE - how to select tags node from the place where the caret is?

Hello to everyone! I've been wracking my brains, trying to find a solution for this. And here is what I have. Task: I want to detect in which tag my cursor(caret) is standing, and then to select ...
4
votes
1answer
3k views

How to edit the actual paragraph dropdown in TinyMCE with custom text styles

I want to give the backend-users only 4 text styles to choose from. Headline, Subheadline, Paragraph and a style we called .statement. Searching for terms like "custom styles in TinyMCE" always ended ...
1
vote
1answer
263 views

Add a TinyMCE Core Plugin Using tiny_mce_before_init

TinyMCE has a core plugin called Advanced List Plugin that turns the bulleted and numbered list buttons into dropdowns with different list styles. I'm trying to add this plugin using ...
3
votes
1answer
1k views

Disable text tab on WordPress text-editor

I'm looking for a way to disable text tab on wordpress text-edito (red square on the pic) for all my users roles except ADMINISTRATOR because i don't want them to have the possibility to add ...
0
votes
1answer
12k views

How to replace the content of tinyMCE editor in both text and visual mode using jQuery?

I have added a button beside the Add Media button in WordPress' post editor. Its called Insert Content button. When this button is pressed, it should send a content, either plain text or HTML, into ...
2
votes
1answer
1k views

TinyMCE - Add class to OL - selector doesn't seem to get parent OL,UL, just LI's (4.6.3)

TLDR: I'm trying to add a class to an <ol>, and can't seem to do it without creating a nested list. Here's what I want: <ol class="bold-numbers"> <li>Item 1</li> </ol> ...
1
vote
1answer
849 views

How to remove buttons from the WP Editor on the edit post page in the admin area

I have a wordpress site that uses both standard posts and custom posts. I have no problem removing buttons from the WP editor when it's related to a custom post type. I just add this below to the CPT ...
1
vote
1answer
337 views

Wordpress Admin Not Loading All Core Scripts

For some reason, Wordpress admin is not loading all of the required scripts via load-scripts.php. This is causing the "Visual/Text" tabs to be missing from the text editor. The 'b', 'i', 'link', etc ...
1
vote
1answer
323 views

Keep pasted pre formatted code as it is -with tabs- in visual editor

I need a manual code to my functions php to extend the visual editor from removing tabs when pasting code blocks. I tried this code, found at this site, but it does not work as I want. If I got: ...
3
votes
1answer
484 views

Apply custom style to single word in Wordpress

I'm setting up a WordPress site for a client. They need to be able to hide individual words through the WYSIWYG editor, which will be revealed upon a click. I've set up a new custom style format in ...
0
votes
0answers
20 views

Still desperate about multiple TinyMCEs in widgets - is there any good solution to this yet?

In a project I have to use multiple tinyMCEs within a single widget. These widgets are also used within the Page Builder Plugin by Siteorigin. However there is still a fundamental problem with ...
2
votes
3answers
1k views

Using main style.css with add_editor_style

All the resources I've read online suggest using a different CSS file (i.e. editor-style.css) in order to style the WYSIWYG editor to better resemble what the actual content will look like. For the ...
4
votes
1answer
2k views

Visual Tab Missing From Editor

The visual/ text tabs have vanished from tinymce. I have tried everything I could find on the web and nothing has worked: Deactivate theme Deactivate all plugins stop concatenation of scripts ...
0
votes
1answer
223 views

Show class from css in format dropdown

is possible to show class directly from css in format dropdown? I try this but doesn't work First create format button function add_editor_buttons($buttons) { array_unshift($buttons, '...
0
votes
0answers
328 views

How to load WP_Editor JS files manually (with AJAX)?

I'm loading WP_Editor manually through AJAX, but I'm running into some issues with the way I'm loading things. Firstly, I'm including all the <script> tags into my AJAX callback, which are ...
1
vote
3answers
4k views

Change Default Font Size and Remove Unwanted Font Sizes in TinyMCE

I use TinyMCE Advance plugin. I've posted a question in the support forum of the the plugin but it seems that the author doesn't provide any support now. As you can see in the picture, the font size ...
1
vote
0answers
525 views

Post content not showing in the edit post textarea

I’m currently building a plugin which requires me to remove the TinyMCE editor and replace with a text area. The following code helps me to remove the TinyMCE editor from the admin area: function ...
0
votes
1answer
422 views

How to apply a custom skin to WP_Editor / TinyMCE?

I'm trying to apply a skin to a custom wp_editor(), but it does not seem to apply whatever I do. The skin is generated from the TinyMCE LESS files, per instructions on https://www.tinymce.com/docs/...
2
votes
0answers
38 views

How can I get the post content displayed in a text field that allows to edit posts?

I replaced my WordPress TinyMCE editor with a custom textarea field. Everything works well when saving the post but whenever I want to edit the post, the textarea field goes blank. I just want to ask ...
1
vote
1answer
2k views

Insert wp_editor on front-end with AJAX?

I'm trying to insert a wp_editor() into a page on the front-end with AJAX. The code I have right now inserts the wp_editor elements and the needed JavaScript and CSS files, but none of the settings I ...
2
votes
0answers
464 views

How to add custom JS to tinymce in wordpress

So I want to enhance the functionality of the TinyMCE editor in WordPress by adding custom JS script and CSS to it. I was able to add custom CSS to it by using this method: function plugin_mce_css($...
1
vote
1answer
575 views

Add Wrapper with Class to WYSIWYG Editor

In our boilerplate, we target all WYSIWYG content on the front-end of the website with the .typography class in typography.scss and compile it using Gulp. We want to avoid making another file since ...
0
votes
1answer
104 views

Sanitize AROUND shortcode

I have a Wordpress plugin which allows users to mark a bullet list and then add a shortcode around it. Unfortunately, when users select the bullet list, the first UL is not selected and therefore they ...
0
votes
2answers
1k views

Wordpress and TinyMCE Advanced: Failed to load javascript

When I change WP_PLUGIN_DIR example: define( 'WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/../wp-content/renamefolder' ); All plugins are shown and I can activate them. But with TinyMCE Advanced ...
1
vote
0answers
429 views

WP TinyMCE (Full + media ) - 4.8 JS Init Dynamicly

I try to add tinyMCE editor to dynamic added elements (Loaded by VUE component), using new API in WP 4.8. And it work but it only add 5 buttons, and no Media button. I tried to use wp.editor....
1
vote
0answers
141 views

How to replace wordpress default text editor (TinyMCE) with a custom one.

I'm on a project that requires me to replace the WordPress text editor(TinyMCE) with a custom one. I've googled it several times but I've not seen a way to make this happen. Does anyone here have a ...
0
votes
1answer
30 views

Identifying first and last instance of shortcode in post

I'm creating some shortcodes that will build an accordion. I need the following: [accordion] [accordion-item title="Trigger Text"]Panel Content[/accordion-item] [/accordion] I want to create a ...
0
votes
1answer
814 views

How to add custom tinymce plugin to new text widget

So I have a custom TinyMCE plugin, which adds a button to the editor. I'm using the mce_external_plugins and mce_buttons filter to add my TinyMCE plugin. After WP 4.8 introduced the simple TinyMCE ...
5
votes
1answer
678 views

Remove 'Custom..' option in tinyMCE colour swatch

Is it possible to remove the 'Custom...' option in the editors colour picker to prevent the user adding custom colours?
1
vote
1answer
618 views

Stop TinyMCE from deleting empty HTML tags

I'm developing a Bootstrap theme for Wordpress and it's very difficult to implement since Bootstrap uses empty tags with data-attributes and classes but TinyMCE removes the empty tags when I save the ...
2
votes
0answers
426 views

how to load tinymce external plugin

I'm trying to load external tinymce plugins but no luck so far. I know WordPress offers mce_external_plugins filter but it seems not make any difference. I have advlist tinymce plugin inside custom ...
0
votes
2answers
1k views

Stop editor from adding “amp;” after every “&”

The WordPress editor keeps adding “amp;” after every “&”. This effectively breaks all my custom links. How can i stop this? I don’t mind all the others things the editor does to the formatting i ...
5
votes
4answers
4k views

TinyMCE in customizer

I use TinyMce on my customizer (for obv reasons). But i encounter a problem that i do not seem to have the answer to. Let me first share you my code that are crucial: Functions.php // text editor ...
0
votes
1answer
2k views

Wordpress wraps span tags into p tags

I am trying to get rid of the undesired behavior. TinyMCE after submitting a post wraps my <span> tags into the <p> tags. Here is an example <div class="conten__title-wrapper"> ...
0
votes
1answer
558 views

Can I disable `wp-tinymce.php` load as script?

If you go to your WordPress dashboard trying to edit a page or post. Do you get wp-tinymce.php load. On some blogs I do, on some, I don't. <script type='text/javascript' src='https://example.com/...
-2
votes
2answers
168 views

Why did my <script> get mangled, and how can I keep from happening again?

I was pulling something from https://CJSHayward.com/books/ and found that it did not have any of the dynamically arranged titles. When I went to edit the page, I found a surprise. I had originally ...
1
vote
0answers
460 views

How to add custom font to TinyMCE FontSelect in WP Admin or filter the fonts available

So I know how to add more default buttons to the TinyMCE Visual Editor using the following: //Add TinyMCE built in buttons add_filter("mce_buttons_2", "add_more_buttons"); function ...
1
vote
0answers
136 views

Advanced tinyMCE insert link error [closed]

My wordpress website has been installed advanced tinymce plugin. In editor, I click insert link and type some characters and then it suggests me link to pages and posts. The first link is inserted ...
0
votes
1answer
875 views

Custom TinyMCE Editor Formats in Dropdown

I use custom TinyMCE Formats in my wordpress editor. Actually i use just two formats which i created in the functions.php: /* TINY MCE FORMATE */ function my_mce_before_init_insert_formats( $...
2
votes
2answers
1k views

How can the tinyMCE dom be manipulated (offical API does not seem to work)?

Is this possible with a tinymce plugin? I think other ways to access the iframe are not working or not recommended. I have found this And tried that in the printing mce plugin inside the TinyMCE ...
2
votes
0answers
1k views

Add TinyMCE editor to windowManager textbox

I'm creating a custom TinyMCE button that will open the following modal to create a shortcode: What I want to have is the textbox be a TinyMCE editor. I was hoping that the TinyMCE body options would ...
3
votes
0answers
491 views

Deprecated TinyMCE API call: windowManager.createInstance(..)

Im working with a TinyMCE plugin (WordPress 4.7.2), and I've noticed that Im getting a method deprecation warning when I create a new modal. However my code example is very similar to Tiny MCE's own ...
1
vote
1answer
244 views

How to use TinyMCE Editor for one of my custom post meta field?

I'm registering a new post type register_post_type('datasheet', [ ...., 'register_meta_box_cb' => [ $this, "add_metaboxes" ] ]); Adding metaboxes function add_metaboxes ( $WP_Post ...
0
votes
1answer
308 views

Custom styles in Tiny MCE with an external CSS file

I have just read an article on how to implement custom styles to the Wordpress Tiny MCE. To be honest I am a bit confused as to why we have to add arrays of styles to functions.php. The problem I ...
0
votes
1answer
330 views

Add visual editor to Media Edit Screen

As of version 3.5, Wordpress added Quicktags to the media description field witch is an improvement over the simple textarea. However, I need a full Wysiwyg editor for a project I'm working on. How ...
0
votes
1answer
704 views

Add WordPress Core CSS into editor-style.css

I am using a custom child theme (from Parabola, Cryout Creations, lastest version), but it seems that the editor-style.css file is not up-to-date. Rather than rewriting everything, I would like it to ...
3
votes
1answer
315 views

Snippet: Use classes instead of inline styles for text alignment

WordPress' TinyMCE (WYSIWYG) editor is adding inline stlyes to the markup when you change the text alignment. This behaviour is hard coded in wp-includes/class-wp-editor.php. Can the inline styles be ...
0
votes
1answer
904 views

How to use value from <select> modal tinymce windowManager?

Hello im using a Javascript File for integrating a button with a function in my TinyMCE editor in my Wordpress enviroment. I want to get the value from the select-Tag field and use it for further ...