[WEB4LIB] question about pasting html into Dreamweaver 4

Justin Rounds jrounds at uchicago.edu
Tue Jan 4 13:18:46 EST 2005


"obviously, this can't be done"
;)

Or at least not the way I think you want it to. It seems to me that what 
you want is to copy both the url *and* the text that is being 
hyperlinked, e.g.:

<a href="http://www.google.com/">Google</a>

so the problem is that this is two pieces of information, and I can't 
see any way that you can copy both pieces of information directly from 
the browser, unless you copy the entire <a href...</a> from the source. 
The tedious workaround is to select the text, copy, paste in the Design 
View, then copy the url (e.g. right-click and "copy link location"), and 
paste it into the Properties for that text.

But if you're using a lot of links from a page (e.g. your embassy links 
example), it would probably be faster to just use a "scratchpad" 
Dreamweaver document, i.e. an unsaved new html document in which you can 
paste the source code, flip it into Design View, and then select and 
drag (or copy and paste) whatever you want into the page you're working on.
_
j


Petter Naess wrote:
> (Forgive me if this is an inappropriate forum for this question, but =
> consulting librarians seemed a good idea when queries to more technical =
> forums got me nowhere.... )
> 
> I suspect I'm overlooking something obvious (such as "obviously, this =
> can't be done," ) but I can't figure out how to copy a url from an html =
> document and paste it into the DW Design View pane without losing the =
> formating!  Seems like a simple and everyday task, but DW just renders =
> everything as plain, unformatted text when you paste it into the design =
> view editor. (I've included below the fruitless exchange I had with =
> well-intentioned responders at a webmaster forum, in case there's any =
> confusion about what it is I'm looking for....) Thanks, Petter
> 
> 
> (earlier - unproductive - traffic on this...)
> response 1:
> 
> I think you are looking for shift + ctrl + v=20
> 
> response 2:
> 
> It might seem a retrograde step to have a small Code View pane open as =
> well as the Design Pane, but there are quite a lot of advantages.=20
> 
> Firstly you can paste straight into there instead, and then click in the =
> Design View to see the changes.=20
> Secondly, there are some things that are easier to do in the code window =
> - moving Rows of a complicated Table layout (one with Colspans) is one =
> that I find easier.=20
> 
> My clarification:
> 
> Thank you both for your responses, but I think perhaps I haven't =
> explained myself clearly enough...=20
> 
> shift+ctrl+v is simply "paste as text" - it does that, and also removes =
> line feeds that plain old ctrl+v would retain, but it does not preserve =
> the format of the copied text.=20
> 
> Pasting directly into Code View won't help either..if you want to paste =
> into Code View, you must first find the source code and paste all of it =
> - href tags and all - into Code View.=20
> 
> Let me try to clarify with an example: I want to build a list of U.S. =
> embassy websites in South Asia. I find a list of all U.S. embassy =
> websites at http://usembassy.state.gov, and wish to paste just those in =
> South Asia into my DW document, retaining the labels (e.g. Afghanistan: =
> Kabul) but also the underlying urls. As far as I can tell, there's no =
> way of doing this simply with DW. You can of course view source, copy =
> the relevant source code into Code View and then edit out whatever you =
> don't need, or you can add the links one at a time in Design View. DW =
> will not even recognize labels that are identical with the underlying =
> url (e.g. "visit our webpage at www.exmaple.com") - the tags always have =
> to be entered manually in Code View, or via the Property Inspector tool =
> in Design View.=20
> 
> If you're trying to build a list of links harvested from many different =
> sources - from other html lists, from urls embedded in text, and even =
> from the address bar of your browser, this becomes very cumbersome, but =
> perhaps there is no easier way of doing it in DW?=20
> 
> 
> response 3:
> 
> Do a 'save page' to your computer. Open the saved file, cut and paste =
> into your new document. Also remember it is CSS styles that define the =
> look so grab the style sheets used in the original page, you can see the =
> location by looking at the code of the saved page.=20
> 
> My response
> 
> Thanks, but as far as I can see, cutting and pasting from a saved file =
> is no different than c&p from a file on the web; DW does not recognize =
> the formatting in either case. And even if it did, this would be a very =
> cumbersome way of building a list of links if you wanted to borrow =
> selectively from a large assortment of pages. I suspect what I wish to =
> do is simply not possible in Dreamweaver, but thanks everyone for all =
> the suggestions!=20
> 
> 
> response 4:
> 
> I'm starting to understand...=20
> OK - well in Dreamweaver, in the Design Window, you can select a =
> sentence containing a phrase that is a URL link, and you can paste it =
> quite happily elsewhere in the Design window, and the sentence will =
> still contain a phrase that has the URL link behind it.=20
> That means that it's not a Dreamweaver problem...=20
> 
> You're right - if on my Mac I copy a sentence containing some links off =
> (say) the BBC website, and paste them into Dreamweaver, I just get the =
> text. The Mac clipboard states the content as "text".=20
> Interestingly, when I copy off the Dreamweaver Design window, the Mac =
> clipboard states the content as text too - I must confess I was =
> expecting "styled text".=20
> 
> But I think that's the problem, or at least part of it...=20
> In the same way, I can create links inside AppleWorks, and cut and paste =
> them to my heart's content within the document, but as soon as I try to =
> export them, or inport others, I get the same problem.=20
> 
> The immediate workaround would seem to be to save the source webpage to =
> disc, and open it in Dreamweaver, where I feel sure you could drag and =
> drop from the source file to your target file.=20
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> *********************************************************************
> Due to deletion of content types excluded from this list by policy,
> this multipart message was reduced to a single part, and from there
> to a plain text message.
> *********************************************************************
> 
> 

-- 
-------------------------------------------
Justin Rounds
Graphic Design and Digital Media Specialist
Digital Library Development Center
University of Chicago
1100 East 57th Street
Chicago, Illinois 60637
(773)702-4391
-------------------------------------------



More information about the Web4lib mailing list