I would like to use ENTER button to insert line break, not SHIFT + ENTER by default. I added this code into function.php. It works but the problem is the text-align buttons are not working. When I click on any text align button, nothing happens. The text align buttons in Both Wordpress editor and TinyMCE Advance plugin editor are not working. But when I remove the code, it comes back normal. How can I solve this issue?
/* Filter Tiny MCE Default Settings */
add_filter( 'tiny_mce_before_init', 'my_switch_tinymce_p_br' );
/**
Switch Default Behaviour in TinyMCE to use "<br>"
On Enter instead of "<p>"
@link https://shellcreeper.com/?p=1041
@link http://codex.wordpress.org/Plugin_API/Filter_Reference/tiny_mce_before_init
@link http://www.tinymce.com/wiki.php/Configuration:forced_root_block
*/
function my_switch_tinymce_p_br( $settings ) {
$settings['forced_root_block'] = false;
return $settings;
}