-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
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
- Go to any page where you have permissions to add a comment
- Add some normal text, Press
ctrl+8, add some code, Pressctrl+8again. -> the code is visible in the comment- editor, inside the tags<code><span class="editor-theme-code"> - Click "Save comment"
- 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