How to add a second stylesheet to the editor
Yes! Any .css file in the top-level of your theme will show up there. e.g.: /wp-content/themes/<your-theme>/custom-style.css will show up in that list as “custom-style.css”, linked and editable.
Yes! Any .css file in the top-level of your theme will show up there. e.g.: /wp-content/themes/<your-theme>/custom-style.css will show up in that list as “custom-style.css”, linked and editable.
Please use this code in your functions.php function tinymce_paste_as_text( $init ) { $init[‘paste_as_text’] = true; return $init; } add_filter(‘tiny_mce_before_init’, ‘tinymce_paste_as_text’); For details please follow link : This will paste copied text in plain format
Instead of using the “type” attribute, try adding a CSS class and styling that. <ol> <li>Number one</li> <li>Number two <ol class=”lower-alpha”> <li>Lowercase a</li> <li>Lowercase b <ul> <li>Paragraph 1</li> <li>Paragraph 2</li> </ul> </li> </ol> </li> </ol> Then in your CSS – depending on your site setup, you may want to add Custom CSS through the Customizer, … Read more
The problem is your <div> inside of your anchor tag. See this answer on StackOverflow about what tags are allowed inside of anchors. Inline elements ( a, span, strong, em among others ) can contain other inline elements and text nodes. and Generally, block-level elements may contain inline elements and other block-level elements. Generally, inline … Read more
I’ve had this code in a custom local plugin for a while. Or you could just stick it in your theme’s functions.php: // Allow iframe in TinyMCE function tinymce_add_iframe( $arr = array() ) { $extra=”iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]”; if ( isset( $arr[‘extended_valid_elements’] ) ) { // append to existing value $arr[‘extended_valid_elements’] .= ‘,’ . $extra; } else { … Read more
Adjust HTML-Filter: <?php function fb_change_mce_options($initArray) { // Comma separated string od extendes tags // Command separated string of extended elements $ext=”pre[id|name|class|style],iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]”; if ( isset( $initArray[‘extended_valid_elements’] ) ) { $initArray[‘extended_valid_elements’] .= ‘,’ . $ext; } else { $initArray[‘extended_valid_elements’] = $ext; } // maybe; set tiny paramter verify_html //$initArray[‘verify_html’] = false; return $initArray; } add_filter(‘tiny_mce_before_init’, ‘fb_change_mce_options’); ?> … Read more
This happens at the time the content is output the browser. At that point, the content is passed through several filters, one of which is called wpautop. This filter function is defined in wp-includes/formatting.php. In combination with the other default WordPress filters, this generally means that you can compose content in the HTML (non-wysiwyg) editor … Read more
you can use simple one liner with remove_post_type_support() : remove_post_type_support( ‘post’, ‘editor’ );
The visual editor is an TinyMCE implementation. The first way to repace a selected text, is to write a plugin for the TinyMCE. If you do not want to write a plugin, use the tinyMCE object: add_action( ‘admin_footer’, ‘tinyNagging’ ); function tinyNagging() { echo ‘ <script type=”text/javascript”> jQuery(document).ready( function() { window.setInterval( function(){ var selectedText = … Read more
That may be a bit problematic. I use the plugin SyntaxHighlighter Evolved, but as the plugin description says (my emphasis): TIP: Don’t use the Visual editor if you don’t want your code mangled. TinyMCE will “clean up” your HTML. Another option is to embed Gists (or similar) using a Shortcode to pass the URL and … Read more