Skip to main content
Participant
June 18, 2018
Answered

Custom HTML tags autocompletion

  • June 18, 2018
  • 1 reply
  • 1859 views

Hi, currently I'm working with OnsenUI CSS library which have a bunch of custom HTML tags.

The problem is, I can't make Dreamweaver to autoclose any of OnsenUI custom tags i.e <ons-row>

And I need to type it manually <ons-row>content</ons-row> to proper close it. This is time consuming.

Any ideas how to instruct Dreamweaver to automatically close customs tags after I type "</"??

Disclaimer : any other HTML/HTML5 tags is properly autoclose, only custom tags is not working

Thanks

This topic has been closed for replies.
Correct answer Jon Fritz

Another option in CC 2015, once you write the custom opening tag, the closing tag list from the code hits will include it.

For example, if you type:

<sometag></s

...you will be presented with a list of all tags starting with "s" including "sometag". You can then arrow down and hit Enter to fill it in.

Once the tag is in the page, it will continue to appear in the code hint list for both starting and closing tags.

1 reply

Jon Fritz
Community Expert
Community Expert
June 18, 2018

What version of DW are you using?

In newer versions (CC2014 and later), the built in Emmet functionality can write tags for you. You just type the name of the tag in Source View and hit Tab, DW will go from "thatname" to <thatname></thatname> automatically (unless it's a reserved name within Emmet). Don't place any brackets around it, just type the tag name and hit Tab to fire Emmet.

I don't know of a way to make DW recognize "invalid" tag names (from its perspective) the way you'd like them to work. Though it may exist, I've never seen it.

Mike_BeeAuthor
Participant
June 18, 2018

I'm using DW 2015.3.

Thanks for your instructions but thats only work with the "valid" HTML/HTML5/CSS/JS tags only and not custom tags (i.e I type form, press TAB and its automatically complete the whole tags <form></form>)

I also tried "Site > Site spesific code hints" functions but its not work as well.

As I remember, DW CS6 can autoclose custom tags after typing "</" but not DW from CC lines.

Any ideas?

p/s: All assets (css/js) files is properly links and accesable

Jon Fritz
Community Expert
Community Expert
June 18, 2018

Sorry, that must have changed after CC2015.

In CC2018, it will turn anything you type into a tagset when you hit Tab.

In CC 2015, you can type in the beginning of the code to go between your tags, highlight it, hit Ctrl + T then type the custom tag you want and hit enter to wrap the code in the custom tag.

If you plan to use the tags all the time though, it might be better to create a bunch of Wrapping Snippets (gone from later versions of the program) of the tags you plan to use and organize them in a folder in the Snippets panel. It would be a bit of a set-up process, but once done, double clicking on the correct Snippet would place the code in your page.