Ckeditor: Keep Source Indentation
I'm using following config for CKEditor: var wysiwyg = ck.replace(el[0], { allowedContent: true, protectedSource: [/\r|\n/g] }); I'm loading HTML source into CKEditor as: <
Solution 1:
I would like to keep the source formatting as it is. Is this possible?
No, it isn't. Content is passed through parsers, filters, writers and browser's DOM many times before it returns to you. You cannot expect to preserve every single tab or space character which is not significant in terms of the content. Please remember that CKEditor is not a code editor - it is a WYSIWYG editor.
Post a Comment for "Ckeditor: Keep Source Indentation"