Skip to main content
added 2 characters in body
Source Link
Scott Joudry
  • 4.2k
  • 3
  • 30
  • 47

You need to set ckeditor configuration setting

config.enterMode

to proper value

(1) The default creates a paragraph element each time the "enter" key is pressed:

config.enterMode = CKEDITOR.ENTER_P; // inserts <p></p>

(2) You can choose to create a "div" element instead of a paragraph:

config.enterMode = CKEDITOR.ENTER_DIV; // inserts <div></div>
  • The setting that you are looking for * (3) If you prefer to not wrap the text in anything, you can choose to insert a line break tag:

    config.enterMode = CKEDITOR.ENTER_BR; // inserts

    The setting that you are looking for *

(3) If you prefer to not wrap the text in anything, you can choose to insert a line break tag:

config.enterMode = CKEDITOR.ENTER_BR; // inserts <br />

The application developer indicates that using the ENTER_BR setting is not recommended. http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.enterMode

There are three more settings that are somewhat related to this subject:

config.fillEmptyBlocks
config.forceEnterMode
config.ignoreEmptyParagraph

A complete list of the available configuration options can be found here: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html

You need to set ckeditor configuration setting

config.enterMode

to proper value

(1) The default creates a paragraph element each time the "enter" key is pressed:

config.enterMode = CKEDITOR.ENTER_P; // inserts <p></p>

(2) You can choose to create a "div" element instead of a paragraph:

config.enterMode = CKEDITOR.ENTER_DIV; // inserts <div></div>
  • The setting that you are looking for * (3) If you prefer to not wrap the text in anything, you can choose to insert a line break tag:

    config.enterMode = CKEDITOR.ENTER_BR; // inserts

The application developer indicates that using the ENTER_BR setting is not recommended. http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.enterMode

There are three more settings that are somewhat related to this subject:

config.fillEmptyBlocks
config.forceEnterMode
config.ignoreEmptyParagraph

A complete list of the available configuration options can be found here: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html

You need to set ckeditor configuration setting

config.enterMode

to proper value

(1) The default creates a paragraph element each time the "enter" key is pressed:

config.enterMode = CKEDITOR.ENTER_P; // inserts <p></p>

(2) You can choose to create a "div" element instead of a paragraph:

config.enterMode = CKEDITOR.ENTER_DIV; // inserts <div></div>
  • The setting that you are looking for *

(3) If you prefer to not wrap the text in anything, you can choose to insert a line break tag:

config.enterMode = CKEDITOR.ENTER_BR; // inserts <br />

The application developer indicates that using the ENTER_BR setting is not recommended. http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.enterMode

There are three more settings that are somewhat related to this subject:

config.fillEmptyBlocks
config.forceEnterMode
config.ignoreEmptyParagraph

A complete list of the available configuration options can be found here: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html

Source Link
Alex Petrov
  • 1.4k
  • 7
  • 10

You need to set ckeditor configuration setting

config.enterMode

to proper value

(1) The default creates a paragraph element each time the "enter" key is pressed:

config.enterMode = CKEDITOR.ENTER_P; // inserts <p></p>

(2) You can choose to create a "div" element instead of a paragraph:

config.enterMode = CKEDITOR.ENTER_DIV; // inserts <div></div>
  • The setting that you are looking for * (3) If you prefer to not wrap the text in anything, you can choose to insert a line break tag:

    config.enterMode = CKEDITOR.ENTER_BR; // inserts

The application developer indicates that using the ENTER_BR setting is not recommended. http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html#.enterMode

There are three more settings that are somewhat related to this subject:

config.fillEmptyBlocks
config.forceEnterMode
config.ignoreEmptyParagraph

A complete list of the available configuration options can be found here: http://docs.cksource.com/ckeditor_api/symbols/CKEDITOR.config.html