Customising the WordPress TinyMce editor and it’s buttons

I think theme_advanced_buttons1, theme_advanced_buttons2 etc were part of the TinyMCE advanced theme which is no longer available in TinyMCE 4. WordPress 4.9.7 is using TinyMCE version 4.7.11. The two rows of controls are now referred to with: mce_buttons mce_buttons_2 Here is a good example, taken from https://www.kevinleary.net/customizing-tinymce-wysiwyg-editor-wordpress/ which allows easy customisation of the buttons on … Read more

Add table controls with wp_editor minimal editor configuration (‘teeny’)

Finally got it running with few pieces of extra buttons too :): <?php $tinymce_options = array(‘plugins’ => “table,lists,link,textcolor,hr”, ‘toolbar1’=>”fontsizeselect,forecolor,backcolor,bold,italic,underline,strikethrough,alignleft,aligncenter,alignright,alignjustify”,’toolbar2’=>”blockquote,hr,table,bullist,numlist,undo,redo,link,unlink”); $editor_config= array(‘teeny’=>true, ‘textarea_rows’=>5, ‘editor_class’=>’csec_text’, ‘textarea_name’=>’csec_text’, ‘wpautop’=>false, ‘tinymce’=>$tinymce_options); wp_editor($content, $id, $editor_config); ?> Check: wp_editor in add_meta_boxes does not show gallery for better option working in accordance with WordPress.

WordPress visual editor broke due to non standard port?

I had exactly same issue with Visual Editor but my site was working on port 80. This is what I did : Edited wp-config.php and added the following : define( ‘CONCATENATE_SCRIPTS’, false ); and everything worked fine. Additionally you can check if wp-includes/js/tinymce/wp-tinymce.js.gz file exists or not. If not, then upload it via FTP

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

I figured this out! I ended up running across this page today searching for something else and thought, THIS IS IT. I needed this property ‘selector’, because it seems like that guides what the selection should be targeting so I changed ‘block’ => ol to ‘selector’ => ‘ol’. function bb_mce_before_init_insert_formats( $init_array ) { $style_formats = … Read more

Easy way to inject js in tinymce iframe?

WordPress injects its own external script files in the TinyMCE editor iframe, see for example the wp-includes/js/tinymce/plugins/wpembed/plugin.js file: (function ( tinymce ) { ‘use strict’; tinymce.PluginManager.add( ‘wpembed’, function ( editor, url ) { editor.on( ‘init’, function () { var scriptId = editor.dom.uniqueId(); var scriptElm = editor.dom.create( ‘script’, { id: scriptId, type: ‘text/javascript’, src: url + … Read more

tinyMCE duplicates previous block element when pressing return (visual editor)

I’m currently having the same problem. Here’s my work-around. add_filter( ‘tiny_mce_before_init’, ‘workaround’ ); public function workaround( $in ) { $in[‘force_br_newlines’] = true; $in[‘force_p_newlines’] = false; $in[‘forced_root_block’] = ”; return $in; } tiny_mce_before_init gives you access to the TinyMCE settings that WordPress’ editor uses. See also: TinyMCEConfiguration The downside to this is instead of “return” resulting … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)