Howto get <br> instead of <p> in TinyMCE Editor

Permalink
Hi

Does somebody have the right tinyMCE config to get <br> instead of <p> by hitting the neter key in the editor?

Thanks a lot.

Cheers

Philipp

 
jgaris replied on at Permalink Reply
You can press shift-enter when typing to give you <br> instead of <p> in TinyMCE.
phaselbo replied on at Permalink Reply
HI

Thanka for your reply.

I know, thats what I told the client, but
he prefers to have the standard beaviour like in Word. Enter --> <br>

THX

Philipp
olliephillips replied on at Permalink Best Answer Reply
olliephillips
I'd be inclined to persuade client of the merits of using the P tag, but you can change this behaviour.

Add the 3 lines below to the tinyMCE.init function in the content block's, editor_config.php file. Or better still copy the entire content block folder to your site root's /blocks folder and make the change there.

tinyMCE.init({
   forced_root_block : false,
   force_br_newlines : true,
   force_p_newlines : false
});


Hope that helps.
SteveAtParadigm replied on at Permalink Reply
I don't see why we shouldn't have both.

Is there a way to 'single enter' for break,
and 'double enter' for new paragraph?

That would be ideal.
phaselbo replied on at Permalink Reply
THX to olliephillips, that was the solution!

Cheers

Philipp