• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Contributor ,
Feb 10, 2021 Feb 10, 2021

Copy link to clipboard

Copied

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.

TOPICS
Code

Views

633

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 10, 2021 Feb 10, 2021

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

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

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

What file type are you working with?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

It is a simple *.html file.

 

I attached it. (It is impossible to attach a HTML file.)

 

 

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

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

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 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

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?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

Sorry, I'm not on a Mac, but the advice is sound for either Mac or PC versions.

It really doesn't matter if the program was installed two years or two minutes ago. The Preferences file can go corrupt, seemingly randomly, and can cause all kinds of weird behaviors, even on a fresh install. 

Restoring Preferences is "Step 1" for almost all DW troubleshooting and will clear a ton of oddities. This "could" be one of them.

Essentially, don't knock it till you try it, LOL.

It could also just be a bug, 2019 was full of them. It wasn't as bad as 2018, but still not great. In the two full releases since 2019, Adobe has squashed more bugs, but they never go back to older versions to fix them, they add them to new releases as they go. 2019 is no longer in development, so it may be worthwhile to install the latest version. Just make sure to uncheck the "Remove Older Versions" option when installing and you can test without losing the old version.

Full releases can be installed on the same machine at the same time (2019 and 2021 for example). Dot releases will overwrite the older version of the same release (a version like 2021.2 would overwrite 2021.0 but leave 2019 alone).

It's handy for times when Adobe pooches the program like they did when they first added the Brackets code engine in the early days. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 11, 2021 Feb 11, 2021

Copy link to clipboard

Copied

@Jon

Thanks for that clarification.

OK, I will reset the preferences file.

Please, how can I backup the file before and how can I restore it, if the reset will not solve the problem?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

The instructions they give on that page for CC2014 and older will work for 2019.

That was before Adobe moved away from the manual method of restoring prefs and shows you which folder you need to back up. 
Obviously, you need to be working from within the CC 2019 folder instead of CC2014, but all the paths should still be the same otherwise.

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

On the page https://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver.html you find the following information:

 

The following file and folder are deleted from your system:

    /[user]/Library/Application Support/Adobe/Dreamweaver [version number] (folder)
    /[user]/Library/Preferences/Adobe Dreamweaver [version number] Prefs (file)
    /[user]/Library/Preferences/Adobe Dreamweaver [version number] Prefs.plist (file)

 

 

~/Library/Preferences/
contains: Adobe Dreamweaver CC 2019 Prefs

but not: Adobe Dreamweaver [version number] Prefs.plist (file)

 

I'm still a little bit insecure, how to reset correctly and be able to restore, if I need that.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

I can say that Restoring Preferences doesn't affect your site's files, if that's what you're worried about. When you rename the folder to _old as directed, DW simply creates a new one when the program is opened.

 

If you're still unwilling to attempt it, my only advice to you would be to install 2021 and see if that works as expected.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 12, 2021 Feb 12, 2021

Copy link to clipboard

Copied

To reset I have to find the file "Adobe Dreamweaver CC 2019 Prefs.plist".

But there is no such file.

Or does that file exist only for specific version of DW but not for all versions?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2021 Feb 15, 2021

Copy link to clipboard

Copied

LATEST

Yeah, I'm not sure why they list those specific files. Renaming the folder is all it takes to kill any possible preferences corruption and the program creates new clean versions of all of the files that get deleted when you open it up after you're done (not just the 3 they list).

Just make sure it's the right Configuration folder. DW has two of them. If you rename the wrong one, DW won't open until you put it back. Be sure you are looking at the one in Library/Application Support when you rename it. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines