how to eliminate spaces in code so that I can paste into my form

Hello there,
I will be new at utilizing dreamweaver and Concerning a question. Enables say I pasted a new text document together with many paragraphs, inbound links, formatting etc…. out of somewhere into dreamweaver, after which you can looking into program code section now, which will dreamweaver generates once more. How can you compress the text within the code section to own no excessive spacing My organization is asking because after i try to text code and composite into my variety, if there can be a spacing of 2-3 characters or maybe more, the rest from the text does not begin the form area, and I must return to that point and click delete, until the remaining portion of the code text comes approximately within 1-2 characters from the code before.

Inside the code section assume Concerning this:
range 1 < p> text1…………….. < /p> < p> text2………….. < /p>
range 2 < p> text3……. < /p>

Plainly did nothing but select the whole code and make an effort to paste into our form, it only accepts approximately end of line 1. The rest doesn’t paste into the form after the point of that too many spacing. I now have to resume the code, squeeze cursor end with line1, and strike delete, and remove all space chracaters, until text3 pops up and towards the end of text2.

it becomes like this particular:
range 1 < p> text1…………….. < /p> < p> text2………….. < /p> < p> text3……. < /p>

Only then the form accepts the completely selection.

May be there are do this inside MS word once pasting this rule to there. I will be wondering how though… It is very repetitive and takes time to achieve this manually, for a considerable text where there’s too much excesive spacing occuring within the code, when dreamweaver causes it.


1) Copy the text out of your Word Doc.
2) Perfect click in PROGRAM CODE VIEW, not layout view, where you need the text for you to appear
3) Find " Paste Special" with the context menu
4) look at the box " Text with structure"
5) Uncheck the actual box " Cleanse Word paragraph spacing"
6) Click " OK"

Which will do it. It will insert an obvious tags and look just like you want it without each of the whitespace.

***Side Note***
Whatever you choose to do, don’t save your message Doc as a web page and actually do it for a page! Word produces the particular weirdest code Truly ever seen for the web page.

regards, and in the particular mean time my spouse and i found this while searching the online…. this is a new macro in vision basic where you invest ms word.
Solution Explicit

Subscription EliminateMultipleSpaces()
‘If anything goes wrong, look at the errorhandler
‘Checks the actual document for increased spaces between words
Along with Selection
. HomeKey Model: =wdStory
Along with. Find
. ClearFormatting
. Replacing. ClearFormatting
‘Here is where it is actually looking for areas between words
. Text = " (! )"
‘This range tells it for you to replace the increased spaces with 1 space
. Replacing. Text = " \1"
. MatchWildcards = True
. Wrap = wdFindStop
. Format = False
. Send = True
‘execute the actual replace
. Make Replace: =wdReplaceAll
Ending With

Along with. Find
‘This time its seeking excessive spaces right after a paragraph mark
. Text = " p "
‘What to help replace it with
. Replacing. Text = " p"
. MatchWildcards = False
. Wrap = wdFindStop
. Format = False
. Send = True
‘Execute the actual replace
. Make Replace: =wdReplaceAll
Ending With
Ending With
Along with Selection
. ExtendMode = False
. HomeKey Model: =wdStory
Ending With
Ending Sub

thus first record this particular macro…. then when you have such some sort of text in expression, first do change all and swap all p using nothing…. and after that run this macro. that also solves the matter for ms concept. And I agree with you thanks pertaining to reminding about microsoft word’s weird rule, I will keep that in mind… Now i will endeavour yours to check if it works…

I tried yours but it did to a clear extent. It eliminated the particular spacing but still whenever either the next line, it not paste into the shape.
this kind of as
< p>……. < /p>
< p>……… < /p>
< quite a few tag>……….. < /some tag>
so ours above still doesn’t paste, although now every one of the lines are starting along at the very left.
so as to paste, i still need to attend the end of each one line and struck delete once, right until it becomes including below:
< p>……… < /p> < p>………… < /p> < quite a few tag>………. < /some tag> < quite a few tag>……………………………………………….. < /some tag>
just then it pastes adequately… so your method brings it near, and now besides hitting delete sometimes whenever there is actually spacing, now i only need to hit once when they get home of every series…. so it continues to be one step quick, but i opt for yours if your self or someone may explain me the right way to overcome last phase because i dont must use ms word and handle everything in dreamweaver….

This entry was posted in Web Design and tagged , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *