Add WYSIWYG editor button as part of Logical Theme Hack #4951

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

Originally created by @LachTrip on GitHub (Sep 19, 2024).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I understand there is a method for adding WYSIWYG editor buttons through custom HTML head, however I was hoping to find a way to do so as part of a logical theme so as to avoid using in app settings.

Exact BookStack Version

v24.03-dev

Log Content

No response

Hosting Environment

Debian 12, installed using official docker-compose

Originally created by @LachTrip on GitHub (Sep 19, 2024). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario I understand there is a method for adding WYSIWYG editor buttons through custom HTML head, however I was hoping to find a way to do so as part of a logical theme so as to avoid using in app settings. ### Exact BookStack Version v24.03-dev ### Log Content _No response_ ### Hosting Environment Debian 12, installed using official docker-compose
OVERLORD added the 🐕 Support label 2026-02-05 09:29:00 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Sep 19, 2024):

Hi @LachTrip,
You could do this via the visual theme system to just add a custom script with the required code, in a location that's loaded when the editor is.

You'd just need to ensure any script tags have a nonce attribute applied as reflected below since otherwise they'd be blocked:

<script nonce="{{ $cspNonce }}">
    // JS code here
</script>
@ssddanbrown commented on GitHub (Sep 19, 2024): Hi @LachTrip, You could do this via the [visual theme system](https://github.com/BookStackApp/BookStack/blob/development/dev/docs/visual-theme-system.md) to just add a custom script with the required code, in a location that's loaded when the editor is. You'd just need to ensure any script tags have a nonce attribute applied as reflected below since otherwise they'd be blocked: ```html <script nonce="{{ $cspNonce }}"> // JS code here </script> ```
Author
Owner

@LachTrip commented on GitHub (Sep 20, 2024):

Thanks @ssddanbrown,
Missed a step and was using a blade template completely unrelated.

@LachTrip commented on GitHub (Sep 20, 2024): Thanks @ssddanbrown, Missed a step and was using a blade template completely unrelated.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#4951