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

Check out code <-> text hightlighting #23

Open
Eonasdan opened this issue May 15, 2022 · 1 comment
Open

Check out code <-> text hightlighting #23

Eonasdan opened this issue May 15, 2022 · 1 comment
Labels
Area: Template Impacts the generic template or the templating system. Priority: Low Type: Feature New feature or request

Comments

@Eonasdan
Copy link
Owner

Look at https://webauthn.guide/. Down at the code examples, hovering over text dims other text and highlights the corresponding code in the code block

@Eonasdan Eonasdan added Type: Feature New feature or request Priority: Low Area: Template Impacts the generic template or the templating system. labels May 15, 2022
@Eonasdan
Copy link
Owner Author

Prism has a line highlight plugin; however, it has to be set beforehand. There is a function that can be called after the page is loaded, unfortunately, it doesn't remove old highlights if you call it more than once

Prism.plugins.lineHighlight.highlightLines(document.getElementById('code1'), '3')()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Template Impacts the generic template or the templating system. Priority: Low Type: Feature New feature or request
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant