-
1. Re: About Dreamweaver's "Apply Source Formatting"
Jon Fritz II Jun 21, 2013 9:44 AM (in response to jyeager11)Yes, you can adjust the formatting of every tag individually by going to Preferences > Code Format > Advanced Formatting: Tag Libraries
-
2. Re: About Dreamweaver's "Apply Source Formatting"
mhollis55 Jun 21, 2013 9:49 AM (in response to jyeager11)I routinely go back and forth between Dreamweaver and BBEdit. I often use BBEdit's "entab" function to help with source formatting but in the <head> region there is never any indentation.
And there are reasons for that. Elements in the <head> region ought not need source formatting, with the exception of JavaScript you write in there. And that JavaScript is always (both in BBEdit and in Dreamweaver's code view) indented properly.
Of course, you can manually insert tabs for yourself.
-
3. Re: About Dreamweaver's "Apply Source Formatting"
jyeager11 Jun 21, 2013 9:59 AM (in response to mhollis55)mhollis55 wrote:
And there are reasons for that. Elements in the <head> region ought not need source formatting, with the exception of JavaScript you write in there. And that JavaScript is always (both in BBEdit and in Dreamweaver's code view) indented properly.
Of course, you can manually insert tabs for yourself.
I've been doing that (inserting spaces - not tabs - manually) and I'm tired of doing it. Hence the question.
And I'm not sure why you WOULDN'T want the contents of your <head> and <body> to be idented. There's no downside and it makes spotting the end of the head / beginning of the body much easier without having to use search/replace.
-
4. Re: About Dreamweaver's "Apply Source Formatting"
jyeager11 Jun 21, 2013 10:00 AM (in response to Jon Fritz II)Awesome. Can you tell me if there's a way to restore defaults? I'm not seeing one, and I should probably know if one exists before I go playing in there a little too recklessly.
-
5. Re: About Dreamweaver's "Apply Source Formatting"
Jon Fritz II Jun 21, 2013 10:53 AM (in response to jyeager11)I don't think there is one, unfortunately.
In DWCS4 you can make a copy of the TagLibraries folder (or individual tag sets within the TagLibraries folder) at...
Program Files(x86) > Adobe > Adobe DW CS4 > configuration > TagLibraries
Then revert to the old copy if you botch something too far to fix it from within DW.
-
6. Re: About Dreamweaver's "Apply Source Formatting"
jyeager11 Jun 22, 2013 7:57 AM (in response to Jon Fritz II)Having now played around with it, I've noticed bugs with the custom tag formatting.
For instance, if I select "Before, Inside, After" and "Formatted and Indented" for ther <style> pr <script> tags, the closing tag is never indented with the rest. And the first line of the contents, either.
The first opening tag will be indented depending on where in the code it's located. The conents will *sometimes* be indented (the first line is often not, and it's not even aligned with the open tag -- it's completely left justified) and then the other lines inside the open/close tags are perfect indented until the closing tag, which never is. So more often than not, the code looks like :
<div id="medrect"> <div class="inner"> <script type="text/javascript"> adSetType('F');htmlAdWH('93310585','RR','RR');adSetType('');
</script>
</div> </div> I don't know if that worked, since spaces and indentation is hard to reproduce on an HTML page.
EDIT: Wow, that did not work out as intended. Since I can't do multiple spaces here, I won't even try to illustrate what I mean.. but suffice it to say there is a lot of manual fixing-up that comes after an Apply Formatting, even if they let us determine tag behavior during code formats... because the feature is faulty.



