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.

203 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
52 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 ...
3
votes
0answers
479 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 ...
3
votes
0answers
250 views

Enable Visual Editor In Comments On CPT Edit Page

I'm trying to adjust the comment form on a custom post type in the admin edit page only. The end result I'm looking for is: Allow switching between Visual and Text editor through the tabs on the top ...
3
votes
0answers
193 views

Dynamically add styles to WP TinyMCE editor

I want to add custom styles to Wordpress using dynamic arrays. My question is how can I add the two arrays to the style_formats array within the 'my_mce_before_init_insert_formats' function ...
3
votes
0answers
1k views

Setting TinyMCE Content in wp_editor

I am currently coding on front-end editing in wordpress. The outcome should be evernote-like editing using wordpress posts. The Wordpress database stores markup without paragraphs and adds them on ...
3
votes
0answers
541 views

Making a custom widget that includes a tinymce and works in Site Origin Page Builder

For a client I'm using Site Origins Page Builder plugin. It enables the client to make rich layouts for each page by dragging and dropping widgets. Site Origin widgets that require a WYSIWYG-editor ...
3
votes
0answers
71 views

Tinymce shortcodes within shortcode contents

I am using wp.mce.views.register to create a simple view for my shortcode in the tinymce editor, this works fine but i am looking for a way to have "nested" shortcodes e.g. [column_3] [info_box] ...
3
votes
0answers
571 views

Visual Editor freezing on text highlight since 4.3

Ever since I updated my website to 4.3 my visual editor is freezing every time I try to highlight a piece of text, or even place my cursor someplace random. This only seems to be happening on the text ...
2
votes
0answers
89 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', '...
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 ...
2
votes
0answers
435 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($...
2
votes
0answers
406 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 ...
2
votes
1answer
276 views

Dynamically adding WYSIWYG to metaboxes

I've created a custom metabox area and need to add the option of multiple metaboxes. So far I found this guide https://jeremyhixon.com/repeating-wordpress-editor/ which works absolutely perfect up ...
2
votes
0answers
99 views

Added custom styles to Visual Editor. Classes are appended and not replaced as intended

Followed several tutorials and have added custom classes in the formats section of the visual editor. The classes used are being appended and not replaced as I had intended. Is there a way to have ...
2
votes
0answers
1k views

Using wp_editor in TinyMCE WindowManager dialog

I'm currently writing a plugin that provides an interface for adding shortcodes, very simple dropdown added to the TinyMCE toolbar which opens a TinyMCE dialog box with text fields etc. This is all ...
2
votes
0answers
28 views

How To Add buttons to the toolbar which appears in TinyMce when you click over images

Using Wordpress 4.4 I need to add a custom button to manipulate images. The button should appear when the user clicks on an image, next to other buttons. An example of the other buttons:
2
votes
0answers
357 views

Add WYSIWYG to Image Description field

I need to build this thing: It's essentially an image with a caption, and it can go inline anywhere in the text. I could just create a shortcode for it I suppose, but I'd really like to integrate it ...
2
votes
1answer
279 views

wpeditor issue - shows both mode and not able to focus/edit during visual mode

I am trying to integrate wpeditor to a textarea using the code below. It brings the TinyMCE editor but if the user leaves the page on visual mode and tries to edit the same again, the visual mode ...
2
votes
0answers
1k views

unwanted <br> and <p> tags in text editor

I'm very surprised that an answer to this isn't easy to find. I've been searching for a solution to this problem for some time now. Google has a few sketchy answers, but they're old. My question is ...
2
votes
1answer
589 views

TinyMCE - Add button that changes direction of selected text

Ok, I am going to create website in Urdu(rtl) & English(ltr) language that contain paragraphs like this: <p style="direction:rtl">کیا حال ہے buddy? سب خیریت ہے؟</p> You can see that ...
2
votes
2answers
2k views

How to make Wordpress and TinyMCE accept <a> tags wrapping block-level elements as allowed in HTML5?

Starting with version 5 the HTML standard allows <a> tags wrap block-level elements. On a specific page I need to wrap a heading and an image with an <a> tag: Some intro text. <div>...
2
votes
0answers
3k views

TinyMCE - TypeError: r is undefined

With the latest pgrade of wordpress tinyMCE was upgraded. This resulted in my custom plugin being rendered useless with deprecated calls. I was able correctly format the event handling and now I am ...
2
votes
0answers
730 views

Wordpress editor strips out anchor tags when they appear on their own line

In the text below, when I toggle the WYSIWYG view from Visual to Text, the anchors are left intact. However, when I switch back to Visual, the anchors are replaced with &nbsp; elements. This is ...
2
votes
0answers
717 views

Adding dropdowns to the tinyMCE editor

I'm new to php and wordpress but I've managed to figure out both pretty easily thanks to the community, forums and blogs. I'm close to figuring out what i want to do here, but wasted hours without ...
2
votes
1answer
490 views

Show All Posts Insert Edit Link

When I click to insert/edit link in the tinyMCE rich editor for a post, then click "Or link to existing content", it shows only posts that are live and published. Is there a way to get the list that ...
2
votes
1answer
552 views

wp_editor on input changes content

I have a text area using wp_editor On first input it works great. Save via text or visual it saves to mysql just fine this is what is in the text area before I save <a href="/wp-content/...
1
vote
0answers
24 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 ...
1
vote
0answers
27 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 ...
1
vote
0answers
176 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 ...
1
vote
1answer
405 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 ...
1
vote
0answers
42 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 ...
1
vote
0answers
51 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 ...
1
vote
0answers
40 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
0answers
245 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() { ...
1
vote
0answers
246 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 ...
1
vote
1answer
212 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 ...
1
vote
0answers
59 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 ...
1
vote
0answers
59 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 ...
1
vote
0answers
74 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. ...
1
vote
0answers
300 views

Documentation for adding a tinyMCE view for visual live preview of custom shortcode?

I'm trying to add a WYSIWYG visual representation for a custom shortcode into the tinyMCE editor but I can barely find any information on how to do that. Researching the last few days resulted in ...
1
vote
0answers
62 views

Adding and removing hidden buttons from Wordpress Customizer Tinymce widget editor using javascript API

Following Weston Ruter's post here: https://make.wordpress.org/core/2017/05/23/addition-of-tinymce-to-the-text-widget/ I came up with this: (function($) { $(document).on('tinymce-editor-setup', ...
1
vote
0answers
398 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
220 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
512 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 ...
1
vote
0answers
496 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 ...
1
vote
0answers
428 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 ...
1
vote
0answers
456 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
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 ...
1
vote
1answer
242 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 ...