After i add these codes to functions.php:
add_editor_style();
function childtheme_mce_btns2($orig) {
return array('formatselect','styleselect', 'underline', 'justifyfull', 'forecolor', '|', 'pastetext', 'pasteword', 'removeformat', '|', 'media', 'charmap', '|', 'outdent', 'indent', '|', 'undo', 'redo', 'wp_help' );
}
add_filter( 'mce_buttons_2', 'childtheme_mce_btns2', 999 );
function childtheme_tiny_mce_before_init( $init_array ) {
$init_array['theme_advanced_styles'] = "box note=box_note;box info=box_info;box warning=box_warning;box download=box_download";
return $init_array;
}
add_filter( 'tiny_mce_before_init', 'childtheme_tiny_mce_before_init' );
I had a style drop down menu in Wordpress Visual Editor with "box note,box info,box warning,box download" options. I created editor-style.css so i got css support for those classes in visual editor.
If i select "box note" style example, wordpress putting it as <p class="box_note"></p>
Problem is when i push enter button for line breaking, wordpress putting <p></p>
automatically.
Basically how can i change those styles using <div> <span>
or anything except <p>
?
Update:
I create some screenshots for you. This is when i select style from style list:
http://www.unsalkorkmaz.com/sorun/sorun1.jpg
This is when i push enter button for line breaking:
http://www.unsalkorkmaz.com/sorun/sorun2.jpg
Wordpress basically creating different <p>
I tried;
remove_filter('the_content', 'wpautop');
remove_filter('the_content', 'wptexturize');
remove_filter('the_content', 'convert_smilies');
remove_filter('the_content', 'convert_chars');
before i create this question but its not the solution seems.
Update 2: Well.. I tried shift+enter to line-break and it works! So i dont know what is difference with enter vs shift+enter in TinyMCE but i want shift+enter function as default of enter button.