Questions tagged [plugin-tinymce]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
88 views

Enqueue MCE Editor CSS in admin page

I am using mce editor for some formatted content. That content is stored in metadata. Now when I render the content it does render the content but the styles for the contents are missing like "...
0 votes
0 answers
21 views

Line Breaks are stripped off when direction property is found

The line breaks are stripped off when the p tag has a dir attribute inserted, to explain further I'll list some examples. Let's say we have 2 lines of text as following <p>Text Paragraph Number ...
1 vote
0 answers
79 views

WP Editor Issue in Backend

I am stuck on silly issue of wp_editor function in WordPress backend in custom plugin page. See issue for wp_editor in attached images I have called the wp_editor function like this <?php ...
1 vote
1 answer
287 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
1 answer
3k 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 ...
3 votes
2 answers
3k 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 ...
  • 745
0 votes
0 answers
151 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?
2 votes
0 answers
311 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', '...
  • 404
2 votes
2 answers
2k 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: ...
  • 404
1 vote
0 answers
213 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 ...
  • 341
1 vote
0 answers
84 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
1 answer
745 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
1 answer
46 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
1 answer
2k 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 ...
3 votes
2 answers
2k 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 ...
3 votes
0 answers
670 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 ...
  • 890
0 votes
1 answer
543 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 ...
  • 298
0 votes
0 answers
640 views

TinyMCE how to add css when inputing a text

I am sorry if this has been asked or it is somewhere on the internet but I just couldn't find anything helpful I have a TinyMCE plugin which when clicked shows up a container with a text box and a ...
0 votes
1 answer
496 views

TinyMCE custom button retrieve value from custom field

I'm creating a plugin that adds a custom button to the default TinyMCE editor in WordPress admin. The following code builds this simple plugin mkay-tinymce-extra-button.php function ...
  • 177
1 vote
0 answers
172 views

Add a select option of shortcodes like dropdown in tinymce

I creeate an plugin where users creating own shortcodes. I want to add TinyMce support to users can select and place shortcode where they want. Can anyone gve me good explanation how to do that? I ...
2 votes
0 answers
2k 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 ...
  • 203
1 vote
1 answer
3k views

TinyMCE custom dialog with selectbox not working

For a theme I add a custom menu to Wordpress' TinyMCE using ed.addButton. Now some of those menu points have more or less elaborate options, so I thought I'd use the custom dialog function of TinyMCE ...
  • 145
1 vote
1 answer
3k views

TinyMCE Editor change underline button behavior - u tag instead of span text-decoration underline

As above. I want to change the WordPress Edtior TinyMCE behavior when I click the underline button I want the TinyMCE to wrap my selection with <u></u> tags. Now, I know that the u tag was ...
  • 49
26 votes
1 answer
944 views

Adding Custom Text Patterns in the WP 4.5 Visual Editor

4.5 is out and with it new Text Patterns. I would like to know how to go about adding my own custom patterns. Taking a look at wp-includes/js/tinymce/plugins/wptextpattern/plugin.js it seems pretty ...
  • 9,589
0 votes
1 answer
978 views

How to modify VisualComposer's TinyMCE editor only for a specific shortcode

I spent a lot of time looking for how to modify the buttons of a TinyMCE editor for a Visual Composer plugin that I'm developing. My requirement was to modify which buttons are shown, but only in the ...
  • 245
0 votes
1 answer
3k views

Allow author to upload image via Media button without plugin

I believe as default WordPress won't allow author to upload image via Media button on TinyMCE. It will give you You don't have permission to attach files to this post. error message if you do. I'm ...
  • 407
1 vote
0 answers
203 views

Adding a colorbutton in tinymce dialog with current api

I'm trying to add a colorbutton in a tinymce dialog box, which i was able to do with the help of using this stackoverflow question here: https://stackoverflow.com/questions/23511566/adding-a-...
5 votes
1 answer
823 views

Tinymce - How to hook before or after live shortcodes rendering?

When the edit post page loads in WordPress admin, I launch a js process which alters the TinyMCE editor’s contents. Recently I've come across the WordPress live shortcode previews which break my code,...
2 votes
1 answer
3k views

Add Item to Custom TinyMCE Menu

I've created a custom menu which appears on my TinyMCE toolbar but would like to add another item to that menu in a separate function elsewhere in my plugin (depending on whether some other ...
0 votes
1 answer
772 views

Add Button to TinyMCE Custom Menu

I've added a new button with a menu to the TinyMCE visual editor using this tremendously helpful tutorial but would now like to add further items to this menu depending on whether various post types ...
1 vote
0 answers
713 views

How to prevent shortcode preview from breaking in tinymce editor?

I am creating visual preview for shortcodes (just like captions). I have don't most of the parts but my preview html is getting broke by the editor when post is saved. I have investigate it further ...
  • 7,715
1 vote
1 answer
3k views

Add a select a class dropdown in tinymce

How can I add add a dropdown/select with pre defined class names into the Wordpress wysiwyg (tinymce advanced) that I can put on different elements? What I'd like: Add some text or any other element ...
  • 1,343
1 vote
1 answer
6k views

Close TinyMCE plugin window on click away

I've created a small plugin which adds a button to the TinyMCE toolbar. When clicked, it opens a popup window via editor.windowManager.open(). That popup can be closed by (1) clicking the "Cancel" or "...
  • 1,421
2 votes
1 answer
861 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 ...
  • 105
2 votes
1 answer
2k views

How to Add TinyMCE's plugin in wordpress?

I had found a TinyMCE's plugin that change the direction of selected text. How to add this plugin in wordpress? Any one guide me? I had tried to add it in /wp-includes/tinymce/plugin/custom-dir/...
  • 105
0 votes
1 answer
151 views

mce_external_languages: how does it really work?

I have been reading very carefully and more than once the documentation, yet I don't understand how to provide a plugin with multiple languages. In the example there is an array, such as: $strings = ...
1 vote
0 answers
209 views

Trouble adding tiny mce to textarea in custom plugin

I'm using the Sunrise open-source OOP framework to develop my plugin. I am building out a new settings page and I'm having trouble adding in a WYSIWYG/tiny MCE textarea to the settings page. I've ...
  • 111
4 votes
2 answers
6k views

TinyMCE Anchor Button not showing

I'm using this filter and function to display a custom, stripped-down version of the TinyMCE editor. Everything works as it should...except the 'Anchor' button will not show ('anchor')? According to ...
  • 445
0 votes
1 answer
385 views

tinymce modal and I18n strings methods

Im working on a plugin that loads a tinyMCE modal. As many who know this normally involves opening a static html or even php file. The problem I've run into, is that I would like to translate using ...
  • 890
1 vote
1 answer
390 views

More than one TinyMCE (wp_editor) with different $settings['drag_drop_upload'] values breaks

It appears that when I have two+ separate wp_editors with different values for drag_drop_upload they all are built as if they have drag_drop_upload set to true. If I set them all to false they act ...
6 votes
1 answer
323 views

Any alternate TinyMCE4 themes / subthemes?

TinyMCE4 in WordPress 3.9 has some cool changes, but it seems to have only one "theme" included. Is there any way to make a sub-theme of the theme defined by CSS, and theme.js in wp-includes/js/...
  • 432
5 votes
2 answers
2k views

wp_localize_script with mce_external_plugins in wordpress

I am not sure if it is possible or not. Can i use wp_localize_script with mce_external_plugins filter? I want to send a variable to the tinymce plugin script. For Example: add_filter( "...
  • 267
1 vote
2 answers
2k views

Using post ID in custom tinyMCE button

I'm building a simple plugin and need to be able to access current post id when user clicks custom tinyMCE button (inside its onclick function). How should I get current post ID to do that. Just for ...
2 votes
3 answers
954 views

How can I control the HTML output of my post?

As you already know, WordPress manipulates posts, even if you write everything in Text mode. (replacing line breaks with \r\n 's , converting single quotes into double quotes etc.) I know this is ...
  • 191
3 votes
0 answers
185 views

Bridge Wordpress Media API with custom tinyMCE plugin [closed]

In my tinyMCE plugin, I would like to be able to call the Wordpress Media manager introduced in WP 3.5. I am currently working on a plugin that needs to fetch images from the library. I know we can ...
  • 31
0 votes
1 answer
655 views

What makes a placeholder resizable in Tinymce?

It's not that hard to make a plugin to TinyMCE, similar to what the Wordpress gallery is doing in WP 3.5. Unfortunately, these custom placeholders are always non-resizable, although they show the ...
  • 432
0 votes
1 answer
175 views

TinyMCE Advances is removing blanks (" ")

I want to keep blanks " " inserted by the user in Wordpress with the TinyMCE Advanced plugin. He keeps them only if there are some letters at the beginning. E.g. Fr 09:00 - 18:00 But he don't ...
  • 631
0 votes
1 answer
291 views

Add custom classes to TinyMCE generated markup

Is there a way to add custom classes to the markup that the tinyMCE WYSIWYG editor? Obviously, I could apply any styles by targeting the post/page wrapper, but my concern is getting markup to play ...
  • 133
2 votes
5 answers
4k views

wordpress 3.5 tinymce height

I've just upgraded wordpress to 3.5 version and I noticed that TinyMCE Advanced Editor is not as tall as before. How can I change default tinyMCE height? UPDATE This is the screenshot of section I ...
  • 247
0 votes
1 answer
429 views

Get the More QuickTag button back

I can't work out how to add the WP quicktag button back into the editor, I have customized the editor as below: function gimko_format_tiny_mce($in) { $in['remove_linebreaks']=false; $in['...
  • 404