question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No way to add a CodeBlock into a ListItem

See original GitHub issue

What’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:

image

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:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
bdbchcommented, Oct 18, 2022

Thanks for the ping @rfgamaral

I reopened this issue.

0reactions
rfgamaralcommented, Oct 18, 2022

Philipp is no longer a maintainer, you should ping @bdbch instead.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found