No way to add a CodeBlock into a ListItem
See original GitHub issueWhat’s the bug you are facing?
The underlying data model supports CodeBlock
inside ListItem
… but it’s not possible via the interface.
The ``` shortcut does nothing in a ListItem
The toggleCodeBlock()
inside a ListItem causes the list to close and then starts the CodeBlock
However, you can cut/paste a code block into a ListItem, because the underlying model actually supports this:
Note: prosemirror can handle this fine. On prosemirror.net: start a list, click the code button, and you’ve got a code block inside a list item.
How can we reproduce the bug on our side?
- On tiptap.dev, start a list
- Click the code button
Can you provide a CodeSandbox?
No response
What did you expect to happen?
A code block should be opened inside the ListItem
Anything to add? (optional)
No response
Did you update your dependencies?
- Yes, I’ve updated my dependencies to use the latest version of all packages.
Are you sponsoring us?
- Yes, I’m a sponsor. 💖
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Embed a code block in a list item with proper indentation in ...
According to Planet Jekyll FAQ,The key is to indent your fenced code block lined up with the list item. Also need to put...
Read more >How to nest code within a list using Markdown [duplicate]
Code is possible in markdown (see here) - you just have to leave a blank line and then indent by 8 spaces as...
Read more >Markdown rendered incorrectly when code block is inside ...
A code block within a nested list causes GitLab's Markdown renderer to incorrectly render the nested list items as code blocks.
Read more >Fenced code blocks within bullet lists - Google Groups
I'm wondering is there a way to use fenced code blocks within bullet lists? Basically, I'd like to have syntax highlighting for multiple...
Read more >Managing code block width - Atlassian Community
Go to the end of the list item, the box shall belong to. In your above example, your cursor should be right after...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks for the ping @rfgamaral
I reopened this issue.
Philipp is no longer a maintainer, you should ping @bdbch instead.