var input = document.getElementById("input").value;if (!input){ // Null or undefined or bad input alert("Invalid input");}// Replace line-breaks with "\n"this.logData.description = input.replace(/(?:\r\n|\r|\n)/g, '\\n');
No comments:
Post a Comment