Skip to main content
Known Participant
February 10, 2021
Question

DW 2019 macOS: "Apply Source Formatting" has no effect

  • February 10, 2021
  • 1 reply
  • 1255 views

When I use the command "Edit > Code > Apply Source Formatting"*  in a HTML or CSS file it has no effect.

 

Is there a way to use this command?

 

Thanks.

This topic has been closed for replies.

1 reply

Jon Fritz
Community Expert
Community Expert
February 10, 2021

Is the code free of structural errors?

Run it through the validator at http://validator.w3.org/nu and repair any issues that are listed.

Errors in the source code can cause DW to get confused and break a lot of the features in the program.

Known Participant
February 11, 2021

Yes, the code is free of errors.
I used a minimal HTML5 testcase, freshly created.

<p>foo</p><p>bar</p>

 

Known Participant
February 11, 2021

When I highlight the example code in a new document and choose Apply Source Formatting, I get the following...

<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Unbenanntes Dokument</title>
</head>
<body>
<p>foo</p>
<p>bar</p>
</body>
</html>


Mine are set to default, but if the above is not what you get, or are expecting to get, you may need to set up the desired indents and line breaks in your Tag Libraries. 

1. Go to Edit > Preferences > Code Format > Tag Libraries
2. Scroll down to "p" and click to highlight it
3. Verify the Line Breaks field is set to "Before and After" (or change it to another desired setting)
4. Verify the Contents field is set to "Formatted and Indented" (or change it to another desired setting)
5. Hit OK
6. Hit Apply


If your code still won't format, you may benefit from restoring preferences: https://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver.html 

 


Thanks for testing Jon.
Did you used the Version 2019 on macOS?

Of course I checked the tag library before I posted. But it is the default. With line breaks before and after the P element.

My version 2019 is freshly installed. So it is very unlikely, that resetting the preferences can heal anything. But I keep it in mind as a possible step. I don't want to loose all my server configurations in the site management.

I will wait until someone who uses the version 2019 on macOS reads this thread.
May be it is a bug in version 2019?