0
When I write more CSS codes than editing the existing ones, the css is not working. How can I fix it?
3 odpowiedzi
+ 3
Use this keypress event function:
function keyIn(event) {
var x = event.which || event.keyCode;
if(x==13) {
event.preventDefault();
document.execCommand('InsertHTML', true, '<br>');
}
}
to force new line to create <br> could solve the issue.
https://code.sololearn.com/WwJr8m0PU8iE/?ref=app
+ 2
Due keycode new line auto creates <div> element, it would disable the styles follow after.
+ 1
thank you