Tiptap: Where is br in code blocks?

Created on 22 Jul 2019  Â·  7Comments  Â·  Source: ueberdosis/tiptap

изображение
Here no
from pushing enter? Why you done this? How we can fix it? Same with standart(one line) codeblock instead creating

on enter, you must just add
.

Also how we should get out inside code?
изображение
It's just creating more and more enter's, why?
2 fast enter's - exit and creating new paragraph.

@philippkuehn
Any suggestions?

bug need repro

Most helpful comment

@andreasvirkus this behavior hasn't changed. it's the prosemirror default.

enter in paragraph creates a new paragraph
shift+enter in paragraph creates a line break
enter in code block creates a line break
shift+enter in code block leaves the code block (and creates a paragraph)

All 7 comments

I have no idea what you are doing. Please provide a meaningful issue description and codesandbox.

Inside of a codebox press enter for a new line. There is no <br>. Press shift + enter for leaving the code block.

Jul-22-2019 17-24-21

For a line break you can use Shift + Enter. A simple Enter will always create a new paragraph. This is intended behavior.

Better docs are in the works. Feel free to make a PR.

For a line break you can use Shift + Enter. A simple Enter will always create a new paragraph. This is intended behavior.

@philippkuehn is it possible this behaviour is now reversed? On the official code-highlighting example, pressing Enter creates a line break inside the code block, but pressing Shift + Enter creates a new paragraph, placing the cursor outside of the code block 🤔

MacOS 10.15.3, Firefox 74 & Chrome 80.0

@andreasvirkus this behavior hasn't changed. it's the prosemirror default.

enter in paragraph creates a new paragraph
shift+enter in paragraph creates a line break
enter in code block creates a line break
shift+enter in code block leaves the code block (and creates a paragraph)

Thanks for getting back to me so quick! Feels odd to me that they'd reverse this, but seems it's out of our hands

how to use button click event to leave the code block?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agentq15 picture agentq15  Â·  3Comments

connecteev picture connecteev  Â·  3Comments

pk-pressf1 picture pk-pressf1  Â·  3Comments

klaasgeldof picture klaasgeldof  Â·  3Comments

jetacpp picture jetacpp  Â·  3Comments