Open
Description
When pressing Shift+Enter within a block that has inline styles applied (either custom or default), the style does not carry over to the new line. Instead, the new line starts with no styling. The expected behavior is for the inline style to persist into the new line, allowing consistent formatting across line breaks as it does when pressing "Enter".
To Reproduce
- Type a sentence and change the text to red
- Place the cursor anywhere in the text and type Shift+Enter
- Start typing - the new text is white, not red.
Intended behavior: Run these steps again and press Enter instead. This is the intended behavior, as the color persists into the new block.
You can see this behavior on the live examples in the BlockNote docs.
Original Block:
[
{
"id": "123",
"type": "paragraph",
"props": {},
"content": [
{
"type": "text",
"text": "This is red",
"styles": {
"textColor": "red" <-- COPY STYLES
}
}
],
}
]
After Shift+Enter Pressed:
[
{
"id": "123",
"type": "paragraph",
"props": {},
"content": [
{
"type": "text",
"text": "This is red\n",
"styles": {
"textColor": "red"
},
{
"type": "text",
"text": "Now it's white",
"styles": {} <-- EMPTY (Should have textColor copied)
}
}
],
}
]
Browser: Arc