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

[Moodle 3.11.6] FR: Highlight content that gets loaded via AJAX #6

Open
danowar2k opened this issue May 3, 2022 · 3 comments
Open
Assignees

Comments

@danowar2k
Copy link

Right now, it seems that content is only highlighted when loaded with the page request. When using a course format like format_tiles (https://bitbucket.org/dw8/moodle-format_tiles) content may be loaded after the fact via AJAX (e.g. clicking on a tile loads the section content via AJAX).

It would be nice if that AJAX loaded content could also be highlighted. Maybe use a Mutator to listen for new content?

@gjb2048 gjb2048 self-assigned this May 3, 2022
@gjb2048
Copy link
Collaborator

gjb2048 commented May 3, 2022

@danowar2k Good point, do you have a patch with a proposed solution please?

@danowar2k
Copy link
Author

It depends, what happens if you run "thejs" twice, i.e. init EnlighterJS twice on a single page?

Does it ignore the already highlighted DOM parts oder does it try to highlight those, breaking everything?

@gjb2048
Copy link
Collaborator

gjb2048 commented May 3, 2022

@danowar2k I don't know, what does your testing show?

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

No branches or pull requests

2 participants