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

refactor: added simplified syntaxt highlight example #62

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

eric-analyze
Copy link

Annelies told me the html was getting complicated (lots of code to highlight a word, at least that was a few weeks ago). This example demonstrates a method which only needs adding some text around the highlighted text pairs, replacing # with the same number per pair (number of text, but start with hl...)(it is HL for highlight, not h1). Javascript adds and removes the .highlight css class on mouse events. css and javascript code can be in seperate files of course. Use it if you think it is useful, kind regards, Eric :)

Annelies told me the html was getting complicated (lots of code to highlight a word). This example demonstrates a method which only needs adding <span class="hl#">some text</span> around the highlighted text pairs, replacing # with the same number per pair (number of text, but start with hl...)(it is HL for highlight, not h1). Javascript adds and removes the .highlight css class on mouse events. css and javascript code can be in seperate files of course.
@eric-analyze eric-analyze changed the base branch from main to dev August 10, 2024 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants