Tinymce inserts

when Enter is pressed to make a line break.

Is there any way to hack Tinymce to make it stop generating these tags?

Comments

lincolndsp’s picture

I meant _

and _

smithaa02’s picture

shift-enter = <br />
enter = <p>

Is this what you were asking?

lincolndsp’s picture

I meant to totally kill paragraphs creation when I make a line break. You see, I use BBcode and BBcode's smart line breaker, and that's why when Tinymce inserts paragraphs then a double line break appears.
I found in tiny_mce.js and tiny_mce_src.js this._def("force_p_newlines", true); and changed true->false but tinymce continues inserting paragraph tags into source page. How can I turn them off ?

muhleder’s picture

I think it is forced_root_block you need to change for this.

greenlite’s picture

I ran into a similar problem where I needed to disable forced_root_block. Changing the default value in tiny_mce.js wasn't working so I started digging around in tinymce.module. There is a string that passes all of the configuration settings to the init script. I just appended ',forced_root_block:false' to the end of that string and everything worked.

Around line 115:

$tinymce_settings .= ",forced_root_block:false";

I would try passing 'force_p_newlines:false' like that. It's not perfect at all, and by no means a permanent solution...but it worked for me. Just remember any edits you make so that you don't pull your hair out later trying to figure out what's going on.

thomas.rambaud’s picture

Have you tried using the force_br_newlines parameter ?