You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I type a hash as the very first character, which converts the first line to a heading, I can never make that line leave heading mode again. Pressing backspace when there's no content left doesn't do anything. (the same thing is true for all other blocks too, like code)
Could we do something like: When the cursor is at the very first position in the editor and backspace is pressed revert that block to unstyled?
The text was updated successfully, but these errors were encountered:
mxstbr
changed the title
Delete heading as first line
Deleting a markdown block in the very first line
Jul 20, 2017
mxstbr
added a commit
to withspectrum/draft-js-markdown-plugin
that referenced
this issue
Sep 22, 2017
When the first thing in an editor is an styled block you cannot get rid
of it, it'll always stay styled, because backspace only deletes the
content.
This patch fixes the issue by introducing custom behaviour for this
specific condition: If we're in the first block of the editor, it's a
styled block, the block is empty and we press backspace we change the
block type to 'unstyled'.
Fixesngs#31
When I type a hash as the very first character, which converts the first line to a heading, I can never make that line leave heading mode again. Pressing backspace when there's no content left doesn't do anything. (the same thing is true for all other blocks too, like code)
Could we do something like: When the cursor is at the very first position in the editor and backspace is pressed revert that block to unstyled?
The text was updated successfully, but these errors were encountered: