Question

I'm working a lot with tables for emails html, and I'm working with Brackets editor. The thing is, it doesn't auto complete table properties like: width, height, cellpadding, cellspacing, etc...

Is there anyway to fix / add that auto complete?

Was it helpful?

Solution

Brackets generally doesn't code-hint things that are deprecated in HTML 5. Consider replacing cellspacing, etc. with more modern CSS alternatives. If you can't do that, here are a couple other suggestions...

If you run Brackets directly from source, then you can just directly modify the HtmlAttributes.json file that controls the code hints.

A more flexible solution would be to write an extension that adds these attributes to the built-in code hints. Unfortunately, code hint extensibility is currently somewhat limited in Brackets: you can only replace the HTML hint provider, not add to its results. You could fork the built-in "HTMLCodeHints" extension that's in the Brackets source, modify its copy of HtmlAttributes.json, and increase its priority (3rd argument to CodeHintManager.registerHintProvider()) so that it replaces the built-in copy. But it's debatable whether that's any cleaner than just running from a patched copy of the source.

So the truly ideal solution -- a small extension that just adds a few new properties to the existing set of hints -- isn't possible today. I've created a user story in the Brackets backlog in the hopes that it will eventually become supported: Code Hints extensibility: consolidate results from multiple providers.

OTHER TIPS

I've added an Extension to Adobe Brackets repository today which adds autocomplete code hints for table properties (width, height, cellpadding and cellspacing), as well as lots of HTML5 tags and elements.

Open Extension Manager in Brackets and search for 'More HTML5 Code Hints' by C.Oliff.

I don't think it is implemented at this momemnt. You can:

  • find an extension that does that job.
  • report this as a bug/feature at the brackets trello website.
  • write an extension that does this yourself.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top