Log in or register to post comments
Last post
Code mode
Hi. I need these behaviors:

1. Pressing enter does not create new <p> element. It adds <br />.
2. Text is pasted as raw text (without background/font colors and other styles) in current <p> tag.
3. Right-click has default browser behavior.

How to achieve this?
Re: Code mode
I solved second point with:

config.forcePasteAsPlainText = true;
Re: Code mode
OK, I decided I will use CKEditor right-click menu (there is no another option I think...), but what about this </br> instead of <p> tag?
Re: Code mode
The enterMode configuration setting will let you choose whether to use <p>, <br /> or <div> tags when the user presses enter.
Re: Code mode
3. should be possible. Just add 'contextmenu' to the removePlugins config property (or rebuild editor without it).

Piotrek Koszuliński (aka Reinmar)
CKEditor JavaScript Developer
--
CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+