Allowing style tag in TinyMCE editor

There are some things to try in this stackoverflow thread. The one I’m trying: add_filter(‘tiny_mce_before_init’, ‘vsl2014_filter_tiny_mce_before_init’); function vsl2014_filter_tiny_mce_before_init( $options ) { if ( ! isset( $options[‘extended_valid_elements’] ) ) { $options[‘extended_valid_elements’] = ‘style’; } else { $options[‘extended_valid_elements’] .= ‘,style’; } if ( ! isset( $options[‘valid_children’] ) ) { $options[‘valid_children’] = ‘+body[style]’; } else { $options[‘valid_children’] .= … Read more

Customizing tinyMCE 4 Styles and Format dropdowns

You can control the font size and type in the format dropdown by adding an editor style. WPSE user helgatheviking explained how to add styles to the format dropdown in her post here. I’ve included the relevant code below with one minor adjustment which allows CSS attributes like color and line-height to be inherited by … Read more

Overriding TinyMCE buttons – Justify button shortcodes not working

Because you are using button references to version 3 of TinyMCE. Beginning in WordPress version 3.9; TinyMCE 4 is being used. Check this page, then click the “View Source” tab to see the new button names. Working from your array above: TinyMCE 3 TinyMCE 4 justifyleft => alignleft justifycenter => aligncenter justifyright => alignright As … Read more

How to edit blockquote image

You can use add_editor_style() to override the default styles with your custom ones. Like this: function wpse158918_override_default_tinymce_styles() { add_editor_style( ‘your-editor-styles.css’ ); add_action( ‘after_setup_theme’, ‘wpse158918_override_default_tinymce_styles’ ); The code would go into your functions.php, the path to the stylesheet is relative to the directory of your current theme. If you are not doing this from your theme, … Read more

Generate Own Custom CSS Button with icon

What you are seeing is from a short code, a shortcode that does not exist anymore. Since you’ve changed themes and seeing this, it means that that shortcode is defined in your previous theme’s functions.php What you’ll need to do is, look at your previous theme’s functions file, and locate where the shortcode is defined. … Read more

Shortcode from admin textarea to page

Your sort of right, the WordPress editor saves content thru a filter called the_content. This filter is used to filter the content of the post after it is retrieved from the database and before it is printed to the screen. Apply this filter to simulate TinyMCE formatting. <?php echo apply_filters( ‘the_content’, $options[‘textarea_input’]); ?>

TinyMCE Javascript URL Question

I think the best way is to use the before_wp_tiny_mce() hook. Then, you can define the url in PHP; and pass it to the page so it is available to TinyMCE. function sgp_before_wp_tiny_mce() { ?> <script type=”text/javscript”> var sgp_plugin_url = “<?php echo plugins_url(‘shortcode_generator_popup.php’, __FILE__); ?>”; </script> <?php } add_action(‘before_wp_tiny_mce’, ‘sgp_before_wp_tiny_mce’); You may need to change … Read more

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