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

How to format the html code

Contributor ,
Dec 22, 2017 Dec 22, 2017

Copy link to clipboard

Copied

Is there a way to automatically format the html code in dreamweaver?

I mean, for example, select the code and automatically get the right alignment of the code like it is possible do in action script.

Is it possible?

Is there a keyboard shortcut?

Thanks.

Views

2.1K
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 ,
Dec 22, 2017 Dec 22, 2017

Copy link to clipboard

Copied

in fact there are differents current feature requests to polish and greatly improve the code formatting / coloring.

you can still have a drop down menu Edit > Code that open a child menu to format and indent the code, AFAIK there is not shortcur for it ?

Votes

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 ,
Dec 22, 2017 Dec 22, 2017

Copy link to clipboard

Copied

Thank you!

Yes, but it does not work either with the mouse or with the keyboard.

Votes

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 ,
Dec 22, 2017 Dec 22, 2017

Copy link to clipboard

Copied

I agree that it really need improvment, but at least for HTML, it is more or less indenting the tags correctly... can you post a screen grab ?

Votes

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 ,
Dec 23, 2017 Dec 23, 2017

Copy link to clipboard

Copied

... or doesn't work?

....

Votes

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 ,
Dec 23, 2017 Dec 23, 2017

Copy link to clipboard

Copied

JavaScript is not HTML.

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

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 ,
Dec 23, 2017 Dec 23, 2017

Copy link to clipboard

Copied

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

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 ,
Dec 23, 2017 Dec 23, 2017

Copy link to clipboard

Copied

Thank you but:

Votes

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 ,
Dec 24, 2017 Dec 24, 2017

Copy link to clipboard

Copied

Thank you again,

a question:

there is not a shortcuts for comments?

Votes

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 ,
Dec 27, 2017 Dec 27, 2017

Copy link to clipboard

Copied

LATEST

Open the Snippets folder.  You will find Comments under JavaScript.  And you can create a custom Trigger Key for quicker insertion of code snippets.

Learn how to reuse code in Dreamweaver with the Snippets panel

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

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 ,
Dec 22, 2017 Dec 22, 2017

Copy link to clipboard

Copied

From the Common Toolbar (shown below) select Apply Source Formatting.  However, you must Edit Tag Libraries 1st to set up your indenting preferences.   Personally, I don't like indented code.

CC-applySourceFormatting.jpg

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

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 ,
Dec 22, 2017 Dec 22, 2017

Copy link to clipboard

Copied

you're right, when code is indented it is too complex to read it, to clearly see the nested tags, having the starting/ending tag in a first view, well it is definitly better to have a one line code ... arf arf...

Votes

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 ,
Dec 23, 2017 Dec 23, 2017

Copy link to clipboard

Copied

Thank you both for the reply.

Yes I know those functions but it seams sometime doesn't work properly,

as well as comment that doesn't change in grey color wen I use it.

Sometime (in both the option that you show me work well), when I will get the same problem I try to understand and I will send a screen shot.

Thank you both.

Votes

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 ,
Dec 23, 2017 Dec 23, 2017

Copy link to clipboard

Copied

the not greyout commented code line is a know bug... well the only workaround is to save the file, or press F5 on code vew... sometimes the only way is to close reopen the file... home code editor will be really improved in the next builds

Votes

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 ,
Dec 23, 2017 Dec 23, 2017

Copy link to clipboard

Copied

Code colors are controlled by your code Theme's LESS file.

Open the LESS file to edit comment color as desired.  Save & close.

.cm-comment {

    color: #CCC;

}

Nancy O'Shea— Product User, Community Expert & Moderator

Votes

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 ,
Dec 23, 2017 Dec 23, 2017

Copy link to clipboard

Copied

Thank you! This seems work properly.

Votes

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