Forum Moderators: open
I have loads of messy font tags like
<font color="12345" size="3" Face="MyriaMM_250 wt 500 wd">
OK I can stip them out using the following regex
</{0,1}font[^>]*>
but when I look at the code in code view, there are loads of new lines and tabs. If I look at it in design view, cut and past it it is fine. Is there a way of getting code view to wrap properly as I would like to keep formatting like <i></i> etc.
Cheers
Cheers.
All it does is apply Dreamweaver's default formatting (tabs, indents, etc.) to the code -- it doesn't change the code at all, doesn't re-write anything, doesn't do anything that could cause any nasty surprises.
You can do some modifying of *how* DW will apply code formatting. In Preferences, under "Code Formatting," you can specify tabs and indent levels, and under the Edit menu -> Tag Libraries, you can set some more preferences for that, at a tag-specific level -- if you always want line breaks before and after particular tags, for example, or you don't want certain tags indented, that sort of thing.
Monkscuba, with Apply Source Formatting you don't even lose "unneeded code" -- you only lose unneeded white space: spaces and tabs. There's another command called "Clean up HTML" under the Commands menu -- this will do a lot of actual code clean up. You get a dialog box with that one, asking what kinds of cleanup you want to do. Generally, this one won't hurt anything either, but it does touch actual code, so use it a little more carefully, especially the free-form "Remove tag" field.
I'd prefer that DW managed its code formatting better so as to *keep* the proper formatting so that we didn't have to clean it up all the time, but that's another issue.
So our new improved smaller page has been uploaded for the bots to get their teeth into.
I'd prefer that DW managed its code formatting better so as to *keep* the proper formatting so that we didn't have to clean it up all the time, but that's another issue.
This is where diligence in setting up your coding preferences is paramount. I work with FP and have similar features as DW does when it comes to formatting code. If you are in a team editing environment, it is imperative that the entire team have their coding preferences identical to one another. If they don't, that is where the issues begin to arise.