I’m working on having the text-align and indentation of paragraphs stay the same after a user clicks Enter at the end of a paragraph. I know there’s a chain of commands that get run when a user clicks Enter, with the last one ending with
I want to write a similar method as
splitBlockKeepMarks where I can keep the previous paragraph’s node’s attributes in the next paragraph node but am having trouble. My first thought was to create a new paragraph node w/ the previous node’s attrs and insert it at the current
from position but that would make two paragraphs once
splitBlock is called with the marks getting removed. I can’t use
setNodeMarkup because the node doesn’t exist until
splitBlock is called.
Does anyone have an idea on how I can do this or has done this before? Still learning more about ProseMirror.