CKEditor Source Formatting:
In many of our Drupal 7 projects, we use CKEditor as default text-editor for textarea field. CKeditor has many useful features. But one feature many of us do not know is that it has a built-in source formatting option. By default in most of our projects it is turned off. If turned of source view of CKEditor will look like this:
But if we enable the source formatting from CKEditor settings:
then the output view of the source will be like this:
So we can see that enabling the source formatting will show us a nicely formatted source.
CKEditor Syntax Highlight:
There is also another nice CKEditor plugin called CodeMirror which allows syntax highlighting for the CKEditor (Source View and Source Dialog). By using this plugin we can see nice looking formatted source view.
Here are some usefull commonly used plugins for CKEditor: