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

Dreamweaver theme for coldfusion tags

Explorer ,
Aug 12, 2024 Aug 12, 2024

Copy link to clipboard

Copied

I love the Coldfusion tags colors used in the old Dreamweaver (for example, CS6) and I hear the same thing from other CF programmers.

In Dreamweaver 2021, I have starting creating my "Classic Dreamweaver" theme using the main.less file but am having problems making the html comments ("<!--") tags grey and the coldfusion comments ("<!---") tags yellow background with black font.

https://helpx.adobe.com/dreamweaver/using/customize-code-coloring.html#mixed-code

.cm-comment { color: #7a7a7a; /* same css class for both coldfusion and html comments */ }

I tried this and it doesn't work, all comments are grey:

.CFM{ .cm-comment { background-color: #FFFF99; color: #000000; } }

Have anyone tried doing it with any success?

TOPICS
Interface

Views

183

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 ,
Aug 12, 2024 Aug 12, 2024

Copy link to clipboard

Copied

I use a Brackets code theme from GitHub called RubyBlue. There are dozens of other themes there as well.

https://brackets-themes.github.io/

 

My Theme contains @ variables near the top of the main.less file.  These @ variables are used throughout the Theme's style.

 

/**
* Theme RubyBlue Copyright (c) 2014 Eric Johnson
* Licensed under MIT
*/

/* Overall Colors */
    @background: #112435;
    @brightgreen: #7BD827;
    @comment: #999;
    @rb-blue: #3e7087;
    @rb-darkblue: #16314a;  /* Currently Unused */
    @rb-lightblue: #82C6E0;
    @rb-magenta: #f0f;
    @rb-orange: #F08047;
    @rb-pink: #d85896;      /* Currently Unused */
    @rb-red: #af2018;
    @rb-violet: #6c71c4;    /* Currently Unused */
    @rb-yellow: #F4C20B;
    @rb-white: #fff;

.CodeMirror {
    .CodeMirror-scroll {
        background-color: @background;
        color: @rb-white;
    }
    .CodeMirror-selected {
        background: lighten(@background, 20%);
    }
    .CodeMirror-gutters {
        background: lighten(@background, 13%);
        border-right: 7px solid @rb-blue;
    }
    .CodeMirror-linenumber {
        color: @rb-white;
    }
    .CodeMirror-cursor {
        border-left: 1px solid @rb-white !important;
    }
    .CodeMirror-matchingbracket {
        color: @rb-magenta !important;
        background-color: transparent;
    }
    .CodeMirror-activeline-background {
        background: lighten(@background, 5%);
    }
    .CodeMirror-searching {
        background-color: fade(@rb-orange, 90%);
        border: 1px dashed white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
        color: @rb-white !important;
    }
}
.CodeMirror-searching.searching-current-match {
    background-color: @rb-red;
}
.cm-comment {
    color: @comment;
}

 

 

See screenshot.

image.png

Change comment style to these variables.

     .cm-comment {
     color: @comment;
     background-color:@rb-yellow;
}

 

Save main.less file (Ctrl+S).

 

Viola! Dark text on yellow background.

 

image.png

 

Hope that helps.

 

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

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
Explorer ,
Aug 12, 2024 Aug 12, 2024

Copy link to clipboard

Copied

Hi Nancy,

 

Thank you for your reply. Is it possible to keep the HTML comments grey and the Coldfusion comments yellow? Right now it is not gradular enough. It does ALL comments with the same css style in my .cfm pages.

 

You can test like this: 

 

test.cfm

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>

<body>
<!-- This is a HTML comment and should have grey font color.-->
<!--- This is a Coldfusion comment and should have background of yellow and black font color.--->
</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 ,
Aug 12, 2024 Aug 12, 2024

Copy link to clipboard

Copied

Code-Mirror Comments are universal in JS, CSS, HTML, PHP, etc...

AFAIK, there are no special selectors for CF code-only.  Probably because DW ended support for CF about a decade ago.

Sorry.

 

You might try using Visual Studio Code with the optional ColdFusion Builder extension.

 

 

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

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
Explorer ,
Aug 12, 2024 Aug 12, 2024

Copy link to clipboard

Copied

Strange that they would end support for their own Coldfusion product. It's like they don't want anyone to adopt Coldfusion, just php. Dreamweaver use to be an excellent product for CF development but that ended after CS6. 

 

Anyway, I tried VS code already with CF Builder extension. It has the exact same issue in that it can't tell the difference between a CF comment and a HTML comment. Thank you for your help, I'll have to explore other options.

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 ,
Aug 12, 2024 Aug 12, 2024

Copy link to clipboard

Copied

Comment colors are universal in most code editors, mainly for consistency.

 

 

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

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
Explorer ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

Anyways, the comments have different functions in html and coldfusion... and they need to be different colors. It is a difference when people seeing the comment in page source view! It can really screws me up if the comments are not correctly colored when programmng.  When creating themes, it there any way to isolate certain "<!---" to be one color and "<!--" to be another color?

 

When I look at this https://github.com/Siddley/Enhanced.HTML.CFML  they are able to do it. I don't mind creating my own theme in DW but it seems like DW doesn't recognize uniquely CF tags and why can't it handle nested comments?  It gets all broken.

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 ,
Aug 20, 2024 Aug 20, 2024

Copy link to clipboard

Copied

LATEST

Last updated 10-12 years ago!  Dreamweaver was rebuilt in 2017 with a different code engine that doesn't support CF Comments.  Sorry.

 

 

 

 

 

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

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