WordPress removes paragraphs. How to disable this behavior?
check this solution help full for you. jQuery(document).ready(function(){ var a = $(‘div’).html(); $(‘div’).html(‘<p>’+a+'</p>’); }); or check this url link
check this solution help full for you. jQuery(document).ready(function(){ var a = $(‘div’).html(); $(‘div’).html(‘<p>’+a+'</p>’); }); or check this url link
here is a link on the code page. I can’t write the code for some reason my browser is not accepting the code tags will try another computer when possible but the link explains all. here is the link. http://codex.wordpress.org/TinyMCE_Custom_Buttons
You can try adding this to your functions.php file: <?php function my_formatter($content) { $new_content=””; $pattern_full=”{(\[raw\].*?\[/raw\])}is”; $pattern_contents=”{\[raw\](.*?)\[/raw\]}is”; $pieces = preg_split($pattern_full, $content, -1, PREG_SPLIT_DELIM_CAPTURE); foreach ($pieces as $piece) { if (preg_match($pattern_contents, $piece, $matches)) { $new_content .= $matches[1]; } else { $new_content .= wptexturize(wpautop($piece)); } } return $new_content; } remove_filter(‘the_content’, ‘wpautop’); remove_filter(‘the_content’, ‘wptexturize’); add_filter(‘the_content’, ‘my_formatter’, 99); ?> Once … Read more
function extend_tiny_mce_defaults( $config ) { // comma separated list of any block-level HTML tag $config[‘theme_advanced_blockformats’] = ‘h1,h2,h3,h4,h5,h6,p,code,address’; return $init; } add_filter( ‘tiny_mce_before_init’, ‘extend_tiny_mce_defaults’, 100 );
The WordPress editor shouldn’t be pulling in the themes CSS files unless you have a file that is named editor-style.css. You can either use the editor-style.css and simply place it in your themes root directory, add certain styles to the stylesheet (not all the theme div and id tags will apply to the WordPress Editor). … Read more
Turns out the ‘no plugins activated’ was not enough. Once I did a completely fresh install (without W3 Total Cache plugin), the issue disappeared.
Copy paste from my answer here but with iframe/video mime type added: Alter image output in content function WPSE_80145_Mime($html, $id) { //fetching attachment by post $id $attachment = get_post($id); $mime_type = $attachment->post_mime_type; //get an valid array of video types, add any extra ones you need $image_exts = array( ‘video/mpeg’, ‘video/mp4’, ‘video/quicktime’ ); //checking the above … Read more
Not sure why this was so hard to answer, but after more research & playing around I have found the answer – for anyone else that is wondering, you just use wp_more in any of the theme_advanced_buttons indices.
Don’t use meta boxes for TinyMCE. It has some kind of conflict with the DOM. Hook your code including wp_editor to edit_page_form action instead: add_action( ‘edit_page_form’, ‘my_second_editor’ ); function my_second_editor() { // get and set $content somehow… wp_editor( $content, ‘mysecondeditor’ ); } See Notes on wp_editor in the Codex.
Why not automate the move from Drupal to WP? I think WP will fix some of the P tag issue during the upload. http://codex.wordpress.org/Importing_Content#Drupal If that isn’t an option, I think WP is using br’s instead of full new p. From the visual editor, I’d delete the copied break altogether and “enter” a new one.