Inline code in comments disappear #5584

Open
opened 2026-02-05 10:11:14 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @mueller-contria on GitHub (Jan 28, 2026).

Describe the Bug

When adding a new or editing an existing comment on a page, I can press ctrl+8 to add text formatted as Inline Code.
After saving the comment, everything added as Code is gone. It is not, that the code-formatting would not work, but the text itself is gone.

Steps to Reproduce

  1. Go to any page where you have permissions to add a comment
  2. Add some normal text, Press ctrl+8, add some code, Press ctrl+8 again. -> the code is visible in the comment- editor, inside the tags <code><span class="editor-theme-code">
  3. Click "Save comment"
  4. The comment appears, but only the normal text before and after the code. The code itself is gone, source-code reveals neither <code>-tags nor the text.

Expected Behaviour

Code in Comment should be visible.
Ideally it would be inside <code>-Tags as it is with code in other parts of a page.

Screenshots or Additional Context

While ctrl+8 seems to work in the editor, but not while saving; most other shortcuts from the normal editor do not work at all and produce a javascript-error:
ctrl+[1-4]
ctrl+6 / ctrl+Q
ctrl+7 / ctrl+E
ctrl+9
all give the following error on the javascript-console:
wysiwyg.js?version=v25.12.2:13 TypeError: Cannot read properties of null (reading 'open')

As these are the shortcuts with no equivalent Icon in the Comment-Editor; and as the shortcuts for commends with an Icon (ctrl+b, ctrl+i, ctrl+o, ctrl+p, ctrl+shift+k) do work as expected, I guess this is not an unexpected behaviour.

But ctrl+8 seems to be a different case, as it seems to be working correctly while editing, but not on saving.

As source code in comments seems to have worked earlier, I guess this is a problem with the new WYSIWYG-Editor

Browser Details

Firefox 147.0.1 (64-Bit) on Windows 11

Exact BookStack Version

v25.12.2

Originally created by @mueller-contria on GitHub (Jan 28, 2026). ### Describe the Bug When adding a new or editing an existing comment on a page, I can press `ctrl+8` to add text formatted as Inline Code. After saving the comment, everything added as Code is gone. It is not, that the code-formatting would not work, but the text itself is gone. ### Steps to Reproduce 1. Go to [any page](https://demo.bookstackapp.com/books/bookstack-demo-site/page/mixed-content-example-page) where you have permissions to add a comment 2. Add some normal text, Press `ctrl+8`, add some code, Press `ctrl+8` again. -> the code is visible in the comment- editor, inside the tags `<code><span class="editor-theme-code">` 3. Click "Save comment" 4. The comment appears, but only the normal text before and after the code. The code itself is gone, source-code reveals neither `<code>`-tags nor the text. ### Expected Behaviour Code in Comment should be visible. Ideally it would be inside `<code>`-Tags as it is with code in other parts of a page. ### Screenshots or Additional Context While `ctrl+8` seems to work in the editor, but not while saving; most other shortcuts from the normal editor do not work at all and produce a javascript-error: `ctrl+[1-4]` `ctrl+6` / `ctrl+Q` `ctrl+7` / `ctrl+E` `ctrl+9` all give the following error on the javascript-console: `wysiwyg.js?version=v25.12.2:13 TypeError: Cannot read properties of null (reading 'open')` As these are the shortcuts with no equivalent Icon in the Comment-Editor; and as the shortcuts for commends with an Icon (`ctrl+b`, `ctrl+i`, `ctrl+o`, `ctrl+p`, `ctrl+shift+k`) do work as expected, I guess this is not an unexpected behaviour. But `ctrl+8` seems to be a different case, as it seems to be working correctly while editing, but not on saving. As source code in comments seems to [have worked earlier](https://github.com/BookStackApp/BookStack/issues/860), I guess this is a problem with the new WYSIWYG-Editor ### Browser Details Firefox 147.0.1 (64-Bit) on Windows 11 ### Exact BookStack Version v25.12.2
OVERLORD added the 🐛 Bug label 2026-02-05 10:11:14 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5584