Wednesday, January 20, 2010

Applying source formatting to your code within Dreamweaver CS4

So this is going to be the first, of hopefully, many little things I share with you.

We are currently migrating content at work. Now, we have a CMS (Content Management System) with a WYSIWYG (What You See, Is What You Get - Sometimes) editor, instead of using the
WYSIWYG editor in the CMS, I prefer to use Dreamweaver to do all my formatting and coding, and then pasting the source from Dreamweaver in to the WYSIWYG Editor (code view).

I was given a HTML file today, to use as a template. When I opened the file in Dreamweaver, the code behind was a mess! No formatting at all, the code was all on 1 line. Now, this irritates me to no end - as I like to be able to read my code!

So, instead of sitting there and re-formatting the code by hand - I thought wouldn't it be neat if Dreamweaver could to this for me! Well it does (hangs head in shame, and thinks of how many hours I have wasted doing this by hand before!).

If you want to apply code formatting to your source, it's a s simple as this:

Select "Commands" > "Apply Source Formatting"

That's it! I know it's simple and I feel like a fool not for using this before!

I hope this has helped someone!

Cheers,

B

No comments:

Post a Comment