Add custom HTML to BODY ending #5180

Closed
opened 2026-02-05 09:46:26 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @DoctorRetromaker on GitHub (Feb 10, 2025).

Describe the feature you'd like

Many JS plugins and libraries need to be loaded just before the tag; same way many of those JS libraries need a <SCRIPT></SCRIPT> code do some initialization.

The request is about add a configuration panel in which add customization code to be placed at the end of the section, just before de tag.

Describe the benefits this would bring to existing BookStack users

This is a supplementary, and many times necessary feature needed to correctly load and run JS libraries or even CSS frameworks

Can the goal of this request already be achieved via other means?

Not in a correct way

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundamental request

How long have you been using BookStack?

3 months to 1 year

Additional context

No response

Originally created by @DoctorRetromaker on GitHub (Feb 10, 2025). ### Describe the feature you'd like Many JS plugins and libraries need to be loaded just before the </BODY> tag; same way many of those JS libraries need a <SCRIPT></SCRIPT> code do some initialization. The request is about add a configuration panel in which add customization code to be placed at the end of the <BODY> section, just before de </BODY> tag. ### Describe the benefits this would bring to existing BookStack users This is a supplementary, and many times necessary feature needed to correctly load and run JS libraries or even CSS frameworks ### Can the goal of this request already be achieved via other means? Not in a correct way ### Have you searched for an existing open/closed issue? - [x] I have searched for existing issues and none cover my fundamental request ### How long have you been using BookStack? 3 months to 1 year ### Additional context _No response_
OVERLORD added the 🔨 Feature Request label 2026-02-05 09:46:26 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Feb 10, 2025):

Can the goal of this request already be achieved via other means?
Not in a correct way

You can usually tweak them without too much effort.
If the script tag has a src, then adding a defer attribute can usually act like being at the end of the body.
Otherwise, if no src, then adding type="module" does something similar.
Otherwise, you can set a listener to dynamically add/load a script.

Alternatively, you could use the visual theme system to add any custom code here by overriding this specific template which is done to allow such customization.

Otherwise, I woudln't be keen to add extra options since there are other ways to achieve this and I wouldn't want to add extra settings based upon ease of suiting guidance of external libs/projects/offerings/services.

@ssddanbrown commented on GitHub (Feb 10, 2025): > Can the goal of this request already be achieved via other means? > Not in a correct way You can usually tweak them without too much effort. If the script tag has a `src`, then adding a `defer` attribute can usually act like being at the end of the body. Otherwise, if no `src`, then adding `type="module"` does something similar. Otherwise, you can set a listener to dynamically add/load a script. Alternatively, you could use the [visual theme system](https://github.com/BookStackApp/BookStack/blob/development/dev/docs/visual-theme-system.md) to add any custom code here by [overriding this specific template](https://github.com/BookStackApp/BookStack/blob/development/resources/views/layouts/parts/base-body-end.blade.php) which is done to allow such customization. Otherwise, I woudln't be keen to add extra options since there are other ways to achieve this and I wouldn't want to add extra settings based upon ease of suiting guidance of external libs/projects/offerings/services.
Author
Owner

@DoctorRetromaker commented on GitHub (Feb 11, 2025):

ok, my apologies ... didn't read the visual theme customization chapter ...

I will, I promise

@DoctorRetromaker commented on GitHub (Feb 11, 2025): ok, my apologies ... didn't read the visual theme customization chapter ... I will, I promise
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5180