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
1answer
19 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 ...
0
votes
0answers
117 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 ...
0
votes
0answers
26 views

TinyMCE in customizer is Not working Properly

I used this code for tinyMCE for my wordpress theme https://wordpress.stackexchange.com/a/274333/77065 but when I try to put text and use option like Bold nothing works, Even after entering text ...
0
votes
0answers
29 views

TinyMCE code works as Theme Template File But Not as Short Code

I have a strange problem I'm hoping you can help me with. The following code works fine in a template file for a theme. But it does NOT work as code in a class in a plugin for a short code. I am ...
0
votes
1answer
41 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 ...
0
votes
0answers
27 views

Configuring buttons on the TimyMCE Toolbar in WordPress (bbPress environment)

If I use this php code to display a Tiny MCE Editor in my bbPress forum (front end): //editor bbpress function bsp_enable_visual_editor( $args = array() ) { global $bsp_style_settings_form ; $...
0
votes
1answer
26 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
0answers
6 views

Hook into tinymce 4 with javascript

I have a Wordpress site using ACF, where several TinyMCE instances may be loaded. I want to be able to hook into these with javascript but am unable to find any documentation on how to do so. In ...
0
votes
0answers
18 views

How can I get the Description textarea field to use the Visual Editor for Attachment Posts

I saw this post involving tags. But I can't figure out which /** * Display advanced TinyMCE editor in taxonomy page */ function wpse_7156_enqueue_category() { global $pagenow, $current_screen; if( ...
0
votes
0answers
33 views

How to add TinyMCE Editor to customizer in WordPress for replacing textarea type?

How to add TinyMCE Editor to customizer.php in WordPress for replacing textarea type?
0
votes
0answers
13 views

Custom TinyMCE buttons not loaded in html mode

I'm trying to add multiple shortcode custom buttons to the TinyMCE wordpress editor. I have writed this code and it's working fine but the buttons are loaded only on the visual editor mode, Is it ...
0
votes
0answers
15 views

Use font-awesome for TinyMCE icons

I've found a solution to add my custom shortcodes to the wordpress TinyMCE editor. I don't have custom icons for the shortcodes ao I'm thinking to use font-awesome. Is possible to set them inside the ...
0
votes
1answer
60 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)...
0
votes
0answers
47 views

Visual editor keeps removing non-breaking spaces

I'm on a virgin WordPress 5.2.3 installation with twenty nineteen theme using the classic editor. I'm facing the problem, that &nbsp; entities added in text tab are removed once I edit the text in ...
0
votes
1answer
74 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 ...
0
votes
0answers
10 views

Process TinyMCE input dependent on custom field

I have a custom post type with several custom fields of type Wysiwyg Editor. My wordpress instance uses tinyMCE as the visual editor. I want to process the text the users input into those fields with ...
1
vote
1answer
42 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
1answer
24 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
0answers
33 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 ...
0
votes
0answers
14 views

tinyMCE line length indicator

I want a line length indicator similar to https://codepen.io/beneggett/pen/GJgVrp in the tinyMCE Editor included in wordpress. Any ideas on how to acomplish this?
0
votes
0answers
67 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 ...
0
votes
0answers
32 views

Adding tag-types (or styles) to TinyMCE in WordPress

In these styles here: Can then add a new line called: 'Medium paragraph' and 'Large paragraph', that wraps that content in <p class="paragraph__medium"> ... </p> or <p class="...
0
votes
0answers
59 views

Custom Drop Down in TinyMce in Elementor

I'm using elementor and added text in drop down,"Span", but its not working i want to know how to add functionality such that it will also work like "Heading 1,2,3,4.." are working. I added "Span" ...
0
votes
0answers
15 views

Wordpress Tinymce editor two space with nbsp;

when i write in wordpress editor the out put is this : {A}&nbsp; &nbsp; &nbsp; {D}&nbsp; &nbsp; &nbsp; {F}   and space . but i need to this : {A}&nbsp;&nbsp;&...
0
votes
0answers
26 views

wp_editor in Frontend Form Not Working With Autosave JS for Form

I have a Site For Frontend Publishing. As it is obvious i use a form with various fields like tags and categories. I took a autosave code snippet from another answer Stack Exchange. setInterval(...
0
votes
0answers
12 views

Inconsistent link coloring in WordPress editor

I am experiencing inconsistent color styling on <a> tags in the WordPress classic WYSIWYG editor. If I highlight the text in the link, the editor wraps the inner text in a <span> but if I ...
0
votes
0answers
23 views

What might cause a parse / syntax error in wp-tinymce.js?

To elaborate on the title....I have a site were the Visual editor either doesn't appear to display the text content (text is white on white), or the option to switch to and from the visual editor ...
0
votes
0answers
10 views

Upgrade to the latest version of TinyMCE

I am planning to use the latest version of TinyMCE in WordPress editor. I have disabled the Gutenberg using the following code. add_filter('use_block_editor_for_post', '__return_false'); But for ...
1
vote
1answer
590 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
114 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
37 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
417 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
449 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
32 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
18 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
180 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 ...
1
vote
0answers
328 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
205 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
26 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
147 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
25 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
178 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
237 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
40 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
46 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
461 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
425 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
21 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
98 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
1answer
96 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 ...