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!!
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.
Copy link to clipboard
Copied
Thank you Jon. I appreciate your response. I hadn't found anything either.
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//////////////
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?
Copy link to clipboard
Copied
You'll have to manually type your special comments.
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.)
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.
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.
Copy link to clipboard
Copied
That would be a handy feature for sure!