[Solved] Remove space from string and write text in separated line
You need to do two things: Grab the content from the TextArea Loop through the lines and trim each one (removing any empty lines) CODE: var content = myTextArea.value; //Split into lines var lines = content.split( /\r?\n/ ); //Your new content var newContent = “”; //Loop through all lines for ( var i = 0; … Read more