I need to trim my HTML code to use among javascript so that I would get rid of unnecessary line breaks and spaces. I found no easy way of doing this. Is there a way to do it in Notepad++ with maybe a plugin or macro or something?
Thank you for your help.
-Tina
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
..but I could not do it. :( I meant that when I replace <div> elements innerHTML with GetElementByID I need a html code that has no line breaks at all, or it will not work. :/ So I need to get rid of all of them! :E Aren't they all unnecessary when it comes to funtionality of html code? :)
Sorry to bother you this much. I should have been more clear. :)
-Tina
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You might try the website - http://notepad-plus.sourceforge.net/uk/site.htm - and look at Peter Shute's article in the pop-out FAQ menu for "Newline find and replace FAQ" to get rid of the newlines.
I'd suggest one line at a time starting with your <div> block, or you will be editing a file with one long line, a tedious endeavor.
Another (remote) possibility is the HTMLTidy plugin found under the TextFX menu, although I don't know if one can use it to remove newlines. --Joel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there!
I need to trim my HTML code to use among javascript so that I would get rid of unnecessary line breaks and spaces. I found no easy way of doing this. Is there a way to do it in Notepad++ with maybe a plugin or macro or something?
Thank you for your help.
-Tina
Thanks a lot! I'll check those out! :)
-Tina
Plugins/TextFX Edit/Delete blank lines.
From the Macro menu, select "Trim Trailing and save" or press Alt-Shift-S.
Regards
Yoong
Hi, and thanks for replies!
..but I could not do it. :( I meant that when I replace <div> elements innerHTML with GetElementByID I need a html code that has no line breaks at all, or it will not work. :/ So I need to get rid of all of them! :E Aren't they all unnecessary when it comes to funtionality of html code? :)
Sorry to bother you this much. I should have been more clear. :)
-Tina
You might try the website - http://notepad-plus.sourceforge.net/uk/site.htm - and look at Peter Shute's article in the pop-out FAQ menu for "Newline find and replace FAQ" to get rid of the newlines.
I'd suggest one line at a time starting with your <div> block, or you will be editing a file with one long line, a tedious endeavor.
Another (remote) possibility is the HTMLTidy plugin found under the TextFX menu, although I don't know if one can use it to remove newlines. --Joel