+ 3

js problem [solved]

im unable to debug the following code https://code.sololearn.com/W7nRaIu3nz9S/?ref=app whenever i type Enter, it automatically adds 2 newlines which is unexpected normally clicking enter would add one newline per click

30th Oct 2020, 2:24 PM
Bot
Bot - avatar
3 Antworten
+ 2
Abhay i was creating an esolang and its ide btw what does that have to do with the main problem🤔
30th Oct 2020, 3:41 PM
Bot
Bot - avatar
+ 2
its now solved i found out that the innerhtml of the contenteditable=true is automatically adjusted to reflect exactly what the user has wrote and so i changed the js to count the number of divs instead of newlines and now its perfectly working
31st Oct 2020, 3:16 AM
Bot
Bot - avatar
+ 1
What is idea of ur code What is it doing
30th Oct 2020, 2:58 PM
Abhay
Abhay - avatar