I'd developing a block that would contain a list of user "bookmarks" that will be used to jump to a certain part of a text within Moodle Book chapter. The block by itself is simple and jumpers will be created as simple <a href="#jump_to_bookmark_33"> elements.
The question is what is the best way to insert a script that would contain a logic for new bookmarks creation (from text selection)? I see I can pass a script through the block I'm developing using
or I can also inherit the theme and include the script using
or any other idea? Which is the best?
Thanks a lot