Open danowar2k opened 2 years ago
@danowar2k Good point, do you have a patch with a proposed solution please?
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?
@danowar2k I don't know, what does your testing show?
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?