Codeblock inside of lists, end list. #450

Closed
opened 2026-02-04 20:06:13 +03:00 by OVERLORD · 10 comments
Owner

Originally created by @Valiantiam on GitHub (Sep 28, 2017).

For Bug Reports

  • BookStack Version: v0.18.1
  • PHP Version: 7.0
Expected Behavior

I should be able to nest code blocks and other items within lists, and then continue those lists somehow.

image

Actual Behavior

When doing a shift+enter to go to a new line without a doublespace, codeblocks in the WYSIWYG editor, try to turn the entire bulletpoint into a codeblock.

image

Originally created by @Valiantiam on GitHub (Sep 28, 2017). ### For Bug Reports * BookStack Version: v0.18.1 * PHP Version: 7.0 ##### Expected Behavior I should be able to nest code blocks and other items within lists, and then continue those lists somehow. ![image](https://user-images.githubusercontent.com/5394853/30986547-6d031822-a459-11e7-8c2a-5459f31b69e1.png) ##### Actual Behavior When doing a shift+enter to go to a new line without a doublespace, codeblocks in the WYSIWYG editor, try to turn the entire bulletpoint into a codeblock. ![image](https://user-images.githubusercontent.com/5394853/30986567-7987d8da-a459-11e7-9ba2-edd5351fac65.png)
OVERLORD added the 📝 WYSIWYG Editor label 2026-02-04 20:06:13 +03:00
Author
Owner

@stealthbird77 commented on GitHub (Oct 28, 2020):

I have noticed that the latest version of tinyMCE has this functionality working.

If Bookstack updated to tinyMCE latest would this feature work?

@stealthbird77 commented on GitHub (Oct 28, 2020): I have noticed that the latest version of tinyMCE has this functionality working. If Bookstack updated to tinyMCE latest would this feature work?
Author
Owner

@Valiantiam commented on GitHub (Nov 10, 2020):

I would also enjoy seeing this re-visited.

@Valiantiam commented on GitHub (Nov 10, 2020): I would also enjoy seeing this re-visited.
Author
Owner

@MaartenUreel commented on GitHub (Dec 21, 2020):

Would really love to have this implemented!

@MaartenUreel commented on GitHub (Dec 21, 2020): Would really love to have this implemented!
Author
Owner

@CodeFinder2 commented on GitHub (Feb 26, 2021):

Would also really appreciate this feature! :-)

@CodeFinder2 commented on GitHub (Feb 26, 2021): Would also really appreciate this feature! :-)
Author
Owner

@Lab-Things commented on GitHub (May 8, 2021):

+1 !

@Lab-Things commented on GitHub (May 8, 2021): +1 !
Author
Owner

@AvrumFeldman commented on GitHub (Nov 23, 2021):

A small workaround which is possibly a bug.

You can get the code block as the next list entry. This doesn't work out of the box as when you are in the list you cannot click on the code block. The solution is to type two lines in another program (vscode) paste it into the list, select it and ctrl+x then the code block option becomes available.

See attached gif showing this in action
f4tW7BrX6w

Note: When I was trying to reproduce it for the recording I kept on running into issues where it worked for a minute and then stopped until I figured out the above sequence, I don't know what the paste does, as I compared the text when written manually and when pasted from vscode and both had identical characters (including hidden characters).

@AvrumFeldman commented on GitHub (Nov 23, 2021): A small workaround which is possibly a bug. You can get the code block as the next list entry. This doesn't work out of the box as when you are in the list you cannot click on the code block. The solution is to type two lines in another program (vscode) paste it into the list, select it and ctrl+x then the code block option becomes available. See attached gif showing this in action ![f4tW7BrX6w](https://user-images.githubusercontent.com/42219106/143077052-9be21436-ec99-4afa-b8a2-01336496db8f.gif) Note: When I was trying to reproduce it for the recording I kept on running into issues where it worked for a minute and then stopped until I figured out the above sequence, I don't know what the paste does, as I compared the text when written manually and when pasted from vscode and both had identical characters (including hidden characters).
Author
Owner

@camaer commented on GitHub (Feb 15, 2022):

+1

@camaer commented on GitHub (Feb 15, 2022): +1
Author
Owner

@stealthbird77 commented on GitHub (Mar 8, 2022):

With https://www.bookstackapp.com/blog/bookstack-release-v22-02/ using the latest version of TinyMCE. Does this feature now work?

I tested it and it seems too

@stealthbird77 commented on GitHub (Mar 8, 2022): With https://www.bookstackapp.com/blog/bookstack-release-v22-02/ using the latest version of TinyMCE. Does this feature now work? I tested it and it seems too
Author
Owner

@ssddanbrown commented on GitHub (Mar 8, 2022):

With https://www.bookstackapp.com/blog/bookstack-release-v22-02/ using the latest version of TinyMCE. Does this feature now work?
I tested it and it seems too

This might well be the case. Not specifically tested this myself but within that release I significantly changed how code blocks are handled, which may mean wider parent location support.

@ssddanbrown commented on GitHub (Mar 8, 2022): > With https://www.bookstackapp.com/blog/bookstack-release-v22-02/ using the latest version of TinyMCE. Does this feature now work? > I tested it and it seems too This might well be the case. Not specifically tested this myself but within that release I significantly changed how code blocks are handled, which may mean wider parent location support.
Author
Owner

@Valiantiam commented on GitHub (Mar 9, 2022):

It does appear to be working now as desired! Great!

@Valiantiam commented on GitHub (Mar 9, 2022): It does appear to be working now as desired! Great!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#450