Custom TinyMCE Editor Formats in Dropdown

You can group styles using the items key – you can nest multiple times too! /* TINY MCE FORMATE */ function my_mce_before_init_insert_formats( $init_array ) { $style_formats = array( array( ‘title’ => ‘Buttons’, ‘items’ => array( array( ‘title’ => ‘Green’, ‘selector’ => ‘a’, ‘classes’ => ‘btn–green’ ) array( ‘title’ => ‘Blue Button’, ‘selector’ => ‘a’, ‘classes’ … Read more

How can I make the page editor trust me?

To avoid the line break when posting 2 images side by side assign the alignleft or alignright class to them and put them on the same line in the editor without skipping any spaces between them. Example: <img src=”https://wordpress.stackexchange.com/wp-content/uploads/your_image.jpg” alt=”” class=”alignleft” /><img src=”/wp-content/uploads/your_image2.jpg” alt=”” class=”alignright” /> Edit I forgot to mention that content after the … Read more

Keyup events in tinymce editor not working

You can create a new plugin with the mce_external_plugins filter.. and link it to a js file. Then, in that file you can do your processing. function tinymce_init() { // Hook to tinymce plugins filter add_filter( ‘mce_external_plugins’, ‘tinymce_plugin’ ); } add_filter(‘init’, ‘tinymce_init’); function tinymce_plugin($init) { // We create a new plugin… linked to a js … Read more

allowing all HTML tags in tinymce editor

[*] Try this function from leighton.com : function override_mce_options($initArray) { $opts=”*[*]”; $initArray[‘valid_elements’] = $opts; $initArray[‘extended_valid_elements’] = $opts; return $initArray; } add_filter(‘tiny_mce_before_init’, ‘override_mce_options’); Hope that helps. [*]

customize tiny MCE blockqute

If it’s for styling purpose, the fastest solution I could think of is by using Javascript. As far as I know, modifying the output of TinyMCE tag would require editing of WordPress core files, so it’s more practical to append a <span> with Javascript. Something like this would do: <script type=”text/javascript> $(‘.post blockquote’).wrapInner(‘<span />’); </script> … Read more

TinyMCE buttons that launch Ajax-generated forms

by using jQuery.ajax(): so, instead of that big form variable: $.ajax({ type: ‘GET’, url: ‘admin-ajax.php’, data: { action: ‘get_my_form’ }, success: function(response){ var table = $(response).find(‘table’); // you don’t seem to use this “table” var $(response).appendTo(‘body’).hide(); // … } }); Now, the php: add_action(‘wp_ajax_get_my_form’, ‘get_my_form’); function get_my_form(){ // build your form here and echo it … Read more

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