Feedback: New WYSIWYG Editor Development API #5535

Open
opened 2026-02-05 10:09:24 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @ssddanbrown on GitHub (Dec 5, 2025).

Description

This issue is intended to gather feedback for the new WYSIWYG Editor Development API, introduced in BookStack v25.12 (The API, the editor was introduced a while before).

Initially the API is very thin to test the structure and documentation.
I've only implemented a few very common abilities used for customizations.

Going forward, instead of increasing the API surface area based upon guessing what folks may need, I'd prefer it to be driven by user requests, so please let me know what you need to achieve, and what abilities you think are currently missing to be able to achieve it.

Originally created by @ssddanbrown on GitHub (Dec 5, 2025). ### Description This issue is intended to gather feedback for the new WYSIWYG Editor Development API, introduced in BookStack v25.12 (The API, the editor was introduced a while before). Initially the API is very thin to test the structure and documentation. I've only implemented a few very common abilities used for customizations. Going forward, instead of increasing the API surface area based upon guessing what folks may need, I'd prefer it to be driven by user requests, so please let me know what you need to achieve, and what abilities you think are currently missing to be able to achieve it.
OVERLORD added the Open to discussion🔩 API Request💻 Front-End labels 2026-02-05 10:09:24 +03:00
Author
Owner

@joaquinrovira commented on GitHub (Dec 20, 2025):

Hi Dan! I am currently using BookStack to host a wiki for a D&D campaign with my friends. I've been attempting to replicate the 5e rulebook aesthetic and have been relying heavily on the Visual Theme System to achieve this with a custom theme.

Image

First things first, I love what you have built. The thoughtfulness and work that has gone into the project is very impressive.

I have been using the beta WYSIWYG editor and have found no issues. My feedback is with regards to the documentation. I am trying to add custom functionality. I want to add a button to "gridify" and existing table so it can better adapt to smaller screens that will:

  • Apply width: 100% to the <table> element
  • Set the <table> display to grid with display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  • Add display: none to the <colgroup> element
  • Add display: contents to all <tbody> and <tr> elements of the table

From what I see in the docs there should be support for calling api.ui.createButton(). Using the browser terminal to inspect the api object I get the following: Uncaught ReferenceError: api is not defined.

I understand then that the code to add custom functionality to the lexical-based editor should be run elsewhere?

For reference, I am running the latest container image lscr.io/linuxserver/bookstack:version-v25.11.6.

@joaquinrovira commented on GitHub (Dec 20, 2025): Hi Dan! I am currently using BookStack to host a wiki for a D&D campaign with my friends. I've been attempting to replicate the 5e rulebook aesthetic and have been relying heavily on the Visual Theme System to achieve this with a custom theme. <p align="center"> <img width="512" height="256" alt="Image" src="https://github.com/user-attachments/assets/f2b822fb-a35a-4d5e-9692-8be62131020b" /></p> First things first, I love what you have built. The thoughtfulness and work that has gone into the project is very impressive. I have been using the beta WYSIWYG editor and have found no issues. My feedback is with regards to the documentation. I am trying to add custom functionality. I want to add a button to "gridify" and existing table so it can better adapt to smaller screens that will: - Apply `width: 100%` to the `<table>` element - Set the `<table>` display to grid with `display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));` - Add `display: none` to the `<colgroup>` element - Add `display: contents` to all `<tbody>` and `<tr>` elements of the table From what I see in [the docs](https://github.com/BookStackApp/BookStack/blob/development/dev/docs/wysiwyg-js-api.md) there should be support for calling `api.ui.createButton()`. Using the browser terminal to inspect the `api` object I get the following: `Uncaught ReferenceError: api is not defined`. I understand then that the code to add custom functionality to the lexical-based editor should be run elsewhere? For reference, I am running the latest container image `lscr.io/linuxserver/bookstack:version-v25.11.6`.
Author
Owner

@ssddanbrown commented on GitHub (Dec 20, 2025):

Hi @joaquinrovira,
The API is due to be introduced for the next feature release (likely v25.12), so you won't find it in current releases right now.
Just a warning for when the new API is available: The new editor is backed by a more strict content structure, so it may be more limiting in customizing existing elements/content, although allowing customization to the structure and content is something we can explore as the API progresses.

@ssddanbrown commented on GitHub (Dec 20, 2025): Hi @joaquinrovira, The API is due to be introduced for the next feature release (likely v25.12), so you won't find it in current releases right now. Just a warning for when the new API is available: The new editor is backed by a more strict content structure, so it may be more limiting in customizing existing elements/content, although allowing customization to the structure and content is something we can explore as the API progresses.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5535