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

Customizing Code Colors specific to text?

Community Beginner ,
Apr 25, 2022 Apr 25, 2022

Copy link to clipboard

Copied

Hi all.  I am wondering if it's possible to change the code of color or SPECIFIC comments only?  I am aware that I can customize the code theme file to change various tags, etc.  However, I have a file that someone else will be working on to make minor color / link changes and need to make sure they know where to do this.  So I want to change all comments that are <!--CHANGE HERE--> to it's own color.  Is this possible? 

The following changes ALL comment colors - in this instance to a yellow background highlight. ".cm-comment {background-color: yellow}"   Is there something I can modify on this to reach my goal?


Thanks all!!

Views

130

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 25, 2022 Apr 25, 2022

Copy link to clipboard

Copied

As far as I've ever seen, no, there's nothing in Brackets (DW's Code Engine) that can modify the colors of some HTML comments, but not others. 

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 Beginner ,
Apr 25, 2022 Apr 25, 2022

Copy link to clipboard

Copied

Thank you Jon.  I appreciate your response.  I hadn't found anything either.

 

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 25, 2022 Apr 25, 2022

Copy link to clipboard

Copied

No.  Instead of colors, try varying the comment formatting.

 

<!--regular html comment-->

/*regular css comment*/

//regular js comment

 

<!--------------SPECIAL HTML COMMENT HERE-------------> 

/**********SPECIAL CSS COMMENT HERE********/

//////////////SPECIAL JS COMMENT HERE//////////////

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

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 Beginner ,
Apr 25, 2022 Apr 25, 2022

Copy link to clipboard

Copied

Thanks Nancy, am I able to assign formatting to the other two types of comments like I can with the .cm-comment tag on HTML comments?

 

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 25, 2022 Apr 25, 2022

Copy link to clipboard

Copied

You'll have to manually type your special comments.

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

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 Beginner ,
Apr 25, 2022 Apr 25, 2022

Copy link to clipboard

Copied

This doesn't appear to work.  I am in an HTML only file.  So the commenting for the other two types actually shows on the live page.

The HTML comments are what I am needing to be able to use - but looking to format only the ones shown here so they pop out - and still be able to have others that don't (currently the others have all been removed in this screen shot.)

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 25, 2022 Apr 25, 2022

Copy link to clipboard

Copied

CSS comments are for use inside CSS files or inside <style> </style> tags only.

 

JS comments are for use inside JavaScript files or inside <script> </script> tags only.

 

 

 

 

Nancy O'Shea— Product User, Community Expert & Moderator
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

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
LEGEND ,
Apr 25, 2022 Apr 25, 2022

Copy link to clipboard

Copied

A good reason to get decent editor which provides the options of adding TODO comments which are listed in a TODOs window - when each of the TODOs in the window is clicked on it jumps you straight to the place in the code where the TODO comment has been left.

 

I dont know if Dreamweaver has the options of Bookmarks, that could be another possibility.

 

 

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 Beginner ,
Apr 25, 2022 Apr 25, 2022

Copy link to clipboard

Copied

LATEST

That would be a handy feature for sure!

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