Copy link to clipboard
Copied
I have an html file with the file extension *.php. It is 95% straight html 5, with a few lines of php. If I choose Edit | Code | Apply Source Formatting, nothing happens. I can understand that DW might not format the php code (i.e., the code within "<?php" and "?>", but it also doesn't format any of the html (e.g., div's, p's, etc). Is this by design? I'm using DW 2017.0.1.
Thanks!
I now see this post: Re: (Dreamweaver 2017.0.1) problems with apply source formatting​.
It looks like it is a bug.
Copy link to clipboard
Copied
Did you define formatting in your Tag Libraries first?
You might also want to validate code for errors.
Copy link to clipboard
Copied
Nancy, I'm unsure what you are asking. If I choose Edit Tag Libraries, the default HTML and PHP tags are defined. I'm not trying to change how it formats the source (i.e., define special formatting). I just want it to format the source (using the default HTML/PHP tag definitions). For example, line up opening and closing div tags.
If I take the same source file and save it with the htm extension, it the Apply Source Formatting does work.
The code does validate.
Thanks.
Copy link to clipboard
Copied
I now see this post: Re: (Dreamweaver 2017.0.1) problems with apply source formatting​.
It looks like it is a bug.
Copy link to clipboard
Copied
Make it known to the development team. The more requests they get to fix it, the higher its priority.
Bugs with fewer requests get lower priority.
Nancy
Copy link to clipboard
Copied
I have a site where all the file extensions are .php. When I use Tools/format source code, DW does nothing. I'm using DW CC, 11193 build.
Is there some setting that can be changed to make this work? It used to work fine, was disabled when I went to CC. If it's not a setting, it must be a bug, but I've submitted a bug report which elicited no response.
Help?
Copy link to clipboard
Copied
To see the script that formats the PHP code, go to C:\Program Files\Adobe\Adobe Dreamweaver CC 2018\www\extensions\default\BracketsDWBeautify\thirdparty\beautify-php.js
Please start a new topic if you need more assistance.
Copy link to clipboard
Copied
Sorry but you missed the point. It does not run the script for .php files.
Bert Onstott
[private info removed by Moderator]
Copy link to clipboard
Copied
Have you tried using CC 2019 ?
Copy link to clipboard
Copied
I’m using it.