Code block being deleted after deleting the following line #2699

Open
opened 2026-02-05 04:51:07 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @Ismael034 on GitHub (Mar 9, 2022).

Describe the Bug

Hi,

I would like to report a bug in the implementation of TinyMCE in Bookstack. When I create a code block, add a new line and then, remove it, the code block also gets deleted.

Thanks!

Steps to Reproduce

  1. Create a new code block
  2. Add a new line with enter
  3. Delete that new line

Expected Behaviour

Only the newly create line should be deleted and not the code block that was before the new line

Screenshots or Additional Context

This first video shows the expected behabiour. Delete the code block just when my cursor is in the code block line:

https://user-images.githubusercontent.com/42477828/157327556-ee03994a-24c3-43c5-b92f-7ee34fbb4f1e.mp4

Instead, the code block gets deleted from the following line

https://user-images.githubusercontent.com/42477828/157327577-01fa2062-0142-458c-9c03-e6ba87fd0ad5.mp4

Browser Details

Google Chrome on Windows 11

Exact BookStack Version

v22.02.3

PHP Version

No response

Hosting Environment

Ubuntu Server with a docker instance of Bookstack

Originally created by @Ismael034 on GitHub (Mar 9, 2022). ### Describe the Bug Hi, I would like to report a bug in the implementation of TinyMCE in Bookstack. When I create a code block, add a new line and then, remove it, the code block also gets deleted. Thanks! ### Steps to Reproduce 1. Create a new code block 2. Add a new line with enter 3. Delete that new line ### Expected Behaviour Only the newly create line should be deleted and not the code block that was before the new line ### Screenshots or Additional Context This first video shows the expected behabiour. Delete the code block just when my cursor is in the code block line: https://user-images.githubusercontent.com/42477828/157327556-ee03994a-24c3-43c5-b92f-7ee34fbb4f1e.mp4 Instead, the code block gets deleted from the following line https://user-images.githubusercontent.com/42477828/157327577-01fa2062-0142-458c-9c03-e6ba87fd0ad5.mp4 ### Browser Details Google Chrome on Windows 11 ### Exact BookStack Version v22.02.3 ### PHP Version _No response_ ### Hosting Environment Ubuntu Server with a docker instance of Bookstack
OVERLORD added the 🐛 Bug📝 WYSIWYG Editor labels 2026-02-05 04:51:07 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2699