Availability: >= 3.0

Type: Object Property

Description: Specifies the line return behavior.


$editor->lineReturns string $lineReturns;

Specifies the behavior when the user presses enter. This property is not case sensitive. Possible values are:

  • 'P'
    Creates a new paragraph (

    tag). This is the default.

  • 'DIV'
    Creates a


tags creates single line returns on enter key press which results in an editing experience similar to Word. Using

tags on enter key press results in paragraph spaced returns and thus a similar editing experience to Dreamweaver. In both modes you can insert a
tag (single line return) by pressing shift+enter.

However, paragraph tags are recommended because this will create the best structured HTML markup that can be understood by the widest variety of devices including screen readers for the hearing impaired and braille devices for the visually impaired. The reason for this is that the paragraphs are actually marked up in the HTML code as being paragraphs thus allowing non-visual browsers to understand your document.

Tip: when using

tags you can still create single line returns and thus an editing experience similar to Word by setting the margin height for paragraphs to 0 in your site's stylesheet. The code to add to your stylesheet would be this:

p {
    margin-top: 0;
    margin-bottom: 0;

If you are editing a snippet of HTML code rather than a complete document then make sure the stylesheet is added to the editor using the addStylesheet method.