File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -48,19 +48,14 @@ export default function createDefaultBehavior (editable) {
4848 } ,
4949
5050 newline ( element , cursor ) {
51- cursor . insertBefore ( document . createElement ( 'br' ) )
5251
53- if ( cursor . isAtEnd ( ) ) {
54- log ( 'at the end' )
5552
56- const noWidthSpace = document . createTextNode ( '\u200B' )
57- cursor . insertAfter ( noWidthSpace )
58-
59- // var trailingBr = document.createElement('br')
60- // trailingBr.setAttribute('type', '-editablejs')
61- // cursor.insertAfter(trailingBr)
53+ if ( cursor . isAtTextEnd ( ) ) {
54+ const trailingBr = document . createElement ( 'br' )
55+ trailingBr . setAttribute ( 'data-editable' , 'remove' )
56+ cursor . insertBefore ( trailingBr )
6257 } else {
63- log ( 'not at the end' )
58+ cursor . insertBefore ( document . createElement ( 'br' ) )
6459 }
6560
6661 cursor . setVisibleSelection ( )
You can’t perform that action at this time.
0 commit comments