Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight Tag & Contents #116

Closed
dshastry opened this issue Apr 28, 2017 · 5 comments
Closed

Highlight Tag & Contents #116

dshastry opened this issue Apr 28, 2017 · 5 comments
Labels

Comments

@dshastry
Copy link

Great feature I noticed in Brackets recently that I think could work great in MJML is tag highlighting. I know we currently have a tag open/collapse function, but sometimes I have a tag open and I'm editing contents, and it would be nice to see where the tag ends. Especially useful when nesting multiple divs

image

@meriadec
Copy link
Contributor

Yep, seems to be trivial to implement with CodeMirror's Tag Matcher https://codemirror.net/demo/matchtags.html

@dshastry
Copy link
Author

Awesome! Yeah I find myself hunting when I have multiple divs open, and it's annoying to sometimes toggle elements expand/closed to see where the closing tag is, so it would certainly be a great help!

@ngarnier
Copy link
Member

ngarnier commented May 5, 2017

@meriadec all it takes is adding this snippet here

      matchTags: {bothTags: true},
      extraKeys: {"Ctrl-J": "toMatchingTag"} // optional - to enable keyboard shortcut to jump from an opening tag to its matching tag

@meriadec
Copy link
Contributor

Worked well, with the highlight addon, but as it overrides the whole line text color (no more coloration) it can be annoying, so I will make it optional via configuration.

screenshot-1494577835_345x252

meriadec added a commit that referenced this issue May 12, 2017
@dshastry
Copy link
Author

Works amazing and I love the new functionality! Thanks guys.

Any possibility to extend this to include CSS highlighting in addition to MJML? Would be helpful when writing/examining/editing css in the mj-head section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants