EnterMode"

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
== EnterMode ==
 
 
 
Sets the editor behavior when the ENTER key is pressed. Accepted values are 'p', 'div', and 'br'.
 
Sets the editor behavior when the ENTER key is pressed. Accepted values are 'p', 'div', and 'br'.
  
 
For example, when typing two lines of text, separating them with ENTER, the following is the expected output for each setting:
 
For example, when typing two lines of text, separating them with ENTER, the following is the expected output for each setting:
 
+
<pre>&lt;!-- If EnterMode = 'p' --&gt;
<pre>
 
&lt;!-- If EnterMode = 'p' --&gt;
 
 
&lt;p&gt;
 
&lt;p&gt;
 
     Line 1
 
     Line 1
Line 21: Line 17:
 
     Line 2
 
     Line 2
 
&lt;/div&gt;
 
&lt;/div&gt;
 +
 
&lt;!-- If EnterMode = 'br' --&gt;
 
&lt;!-- If EnterMode = 'br' --&gt;
 
Line 1&lt;br /&gt;
 
Line 1&lt;br /&gt;
 
Line 2
 
Line 2
 
</pre>  
 
</pre>  
 
 
For proper semantic we '''strongly recommend''' leaving this option set to its default value ''''p''''. Also , when EnterMode is set to 'p' or 'div', the editor guarantees that inline elements, like text and images, will be always hold by block elements.
 
For proper semantic we '''strongly recommend''' leaving this option set to its default value ''''p''''. Also , when EnterMode is set to 'p' or 'div', the editor guarantees that inline elements, like text and images, will be always hold by block elements.

Latest revision as of 11:29, 29 February 2008

Sets the editor behavior when the ENTER key is pressed. Accepted values are 'p', 'div', and 'br'.

For example, when typing two lines of text, separating them with ENTER, the following is the expected output for each setting:

<!-- If EnterMode = 'p' -->
<p>
    Line 1
</p>
<p>
    Line 2
</p>

<!-- If EnterMode = 'div' -->
<div>
    Line 1
</div>
<div>
    Line 2
</div>

<!-- If EnterMode = 'br' -->
Line 1<br />
Line 2

For proper semantic we strongly recommend leaving this option set to its default value 'p'. Also , when EnterMode is set to 'p' or 'div', the editor guarantees that inline elements, like text and images, will be always hold by block elements.

This page was last edited on 29 February 2008, at 11:29.