indvd00m@0: indvd00m@0: indvd00m@0: indvd00m@0: indvd00m@0: indvd00m@0: ENTER Key Configuration — CKEditor Sample indvd00m@0: indvd00m@0: indvd00m@0: indvd00m@0: indvd00m@0: indvd00m@0: indvd00m@0: indvd00m@0: indvd00m@0:

indvd00m@0: CKEditor Samples » ENTER Key Configuration indvd00m@0:

indvd00m@0:
indvd00m@0: This sample is not maintained anymore. Check out its brand new version in CKEditor SDK. indvd00m@0:
indvd00m@0:
indvd00m@0:

indvd00m@0: This sample shows how to configure the Enter and Shift+Enter keys indvd00m@0: to perform actions specified in the indvd00m@0: enterMode indvd00m@0: and shiftEnterMode indvd00m@0: parameters, respectively. indvd00m@0: You can choose from the following options: indvd00m@0:

indvd00m@0: indvd00m@0:

indvd00m@0: The sample code below shows how to configure CKEditor to create a <div> block when Enter key is pressed. indvd00m@0:

indvd00m@0:
indvd00m@0: CKEDITOR.replace( 'textarea_id', {
indvd00m@0: 	enterMode: CKEDITOR.ENTER_DIV
indvd00m@0: });
indvd00m@0:

indvd00m@0: Note that textarea_id in the code above is the id attribute of indvd00m@0: the <textarea> element to be replaced. indvd00m@0:

indvd00m@0:
indvd00m@0:
indvd00m@0: When Enter is pressed:
indvd00m@0: indvd00m@0:
indvd00m@0:
indvd00m@0: When Shift+Enter is pressed:
indvd00m@0: indvd00m@0:
indvd00m@0:
indvd00m@0:
indvd00m@0:

indvd00m@0:
indvd00m@0: indvd00m@0:

indvd00m@0:

indvd00m@0: indvd00m@0:

indvd00m@0:
indvd00m@0: indvd00m@0: indvd00m@0: