Tag Info

New answers tagged

2

You asked the question a long ago but I was looking for something similar and found a solution. Enqueue an admin side script on post edit screens(where we have tinyMCE). Then use the code below: (function($) { 'use strict'; $(document).ready(function() { $(document).on( 'click', '#mce-modal-block', function() { ...


0

This worked for me: function hide_editor() { if(isset($_REQUEST['post'])){ $post_id = $_REQUEST['post']; $template_file = get_post_meta($post_id, '_wp_page_template', true); if($template_file == 'page-home.php'){ // template name here remove_post_type_support('page', 'editor'); } } } add_action( 'load-post.php', 'hide_editor' ); ...


2

Better solution if you want to disable this: use a plugin. Same code as from Christine's comments: https://wordpress.org/plugins/disable-emojis/ Same code that also fixes the smilies to be the older ones: https://wordpress.org/plugins/classic-smilies/ Source: Me, since I wrote that code in the first place. ...


12

We will hook into init and remove actions as followed: function disable_wp_emojicons() { // all actions related to emojis remove_action( 'admin_print_styles', 'print_emoji_styles' ); remove_action( 'wp_head', 'print_emoji_detection_script', 7 ); remove_action( 'admin_print_scripts', 'print_emoji_detection_script' ); remove_action( ...


1

This is possible with a custom plugin, but lot of effort. I like the way about css in the front end. The table button in TinyMCE creates a default table, without classes, like: <table> <tr> <td>Text</td> <td>Text</td> <td>Text</td> </tr> <tr> ...


1

Some of them are TinyMCE core options. You can view them in TinyMCE - Configuration. In file /wp-includes/class-wp-editor.php there is some explanations. Obviously its not all, but it's a start. /** * Parse default arguments for the editor instance. * * @param string $editor_id ID for the current editor instance. * @param array $settings { * ...


0

If you do want to make a button from scratch try using this code: <script type="text/javascript" src="<your installation path>/tinymce/tinymce.min.js"></script> <script type="text/javascript"> tinymce.init({ selector: "textarea", toolbar: "mybutton", setup: function(editor) { editor.addButton('mybutton', { ...



Top 50 recent answers are included