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

How can I set JSON/JavaScript/TypeScript files formatting to have opening braces put on new line?

Engaged ,
Apr 03, 2020 Apr 03, 2020

Copy link to clipboard

Copied

I'm used to read C style code (i.e. JSON/JavaScript/TypeScript) having the opening braces put on a new line. So, I'd like to set this formatting style in Dreamweaver for having it use that style of formatting when it auto-formats code.

 

How can I do that?

TOPICS
Code

Views

1.1K

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 ,
Apr 03, 2020 Apr 03, 2020

Copy link to clipboard

Copied

Have you tried creating your own set of rules? Go to Preferences > Code Format > Tag Library Editor

 

junk.png

Wappler, the only real Dreamweaver alternative.

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
Engaged ,
Apr 04, 2020 Apr 04, 2020

Copy link to clipboard

Copied

I don't get it ... Would you mind elaborating?

What exactly would I need to do in the Tag Editor to have opening braces always start on a new line?

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 ,
Apr 04, 2020 Apr 04, 2020

Copy link to clipboard

Copied

LATEST

I apologise, the tag library does nothing for what you want. 

 

Which brings me to the fact that I do not quite get what it is that you want. When I create a so-called C style code, I have no problem with the way that braces are handled.

 

junk.png

The moment that I enter the first brace, the cursor sits between the opening and closing tag. Clicking on Enter, the next line is indented ready for the next bit of code. The above sample was done using Dreamweaver, normally I use another editor with the exact same outcome.

Wappler, the only real Dreamweaver alternative.

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