Blog Post - 5. Januar 2018
Allow newline (\n) in ckeditor

Allow newline (\n) in ckeditor

By default newline (\n) is not protected by ckeditor and will be removed while reading contents. Therefore a lot of my <code> embeds changed to one line after I switched to ckeditor and edited a post. I just had to add \n to the the protected source inside the ckeditor config:

config.protectedSource.push( /\n/g );

Keep in mind that in WYSIWYG mode the line breaks still won't be visible ;-)