When I create a brand new editor, autofocus will place the cursor.
Then the currentDom.node.tagName
is <DIV>
(the html is:
<div><p><br></p></div>
Is there a way to force it to go to the <p>
?
When I create a brand new editor, autofocus will place the cursor.
Then the currentDom.node.tagName
is <DIV>
(the html is:
<div><p><br></p></div>
Is there a way to force it to go to the <p>
?
What is currentDom
?
I guess @murder3kz means that the default editor’s ‘p’ node’s(it’s text node’s parent node) tagname is ‘DIV’, he want change to ‘P’ so, just create a schema which toDOM method return [‘p’, blabla]. And set it’s content only ‘text’ node will work.