...

View Full Version : Dreamweaver CS3: HTML-ifying pasted text?



Spudhead
10-19-2007, 03:52 PM
One of the things I find myself spending a lot of time doing runs like this:

Client sends copy in Word doc (or email :rolleyes: )

I c&p into Notepad and then into Dreamwaver (cos text pasted out of Notepad is "cleaner" than out of Word... or something... I dunno :o )

I then do a bunch of batch replaces for apostrophes and dashes and other non-HTML-friendly elements, with their code counterparts, and then visually check the code to make sure I've not missed anything odd.


After doing this for way longer than I'd care to admit, it's suddenly dawned on me that there might be an easier way. Does anyone know one? Does Dreamweaver CS3 have a "find and replace bad characters" command? A "paste text with all the nasty stuff already replaced" setting?

Actually, while I'm here, is there some way to set up a keyboard shortcut for inserting ’?

I should RTFM :(

_Aerospace_Eng_
10-19-2007, 06:54 PM
DW actually has a "Clean Up Word HTML" under the Commands menu.

Spudhead
10-26-2007, 11:36 AM
Yeah, but that'll just remove loads of the useless HTML tags that Word puts in when you 'save as web page'.

I'm talking about pasting copy into Dreamweaver and having it find all the apostrophes and replace them with ’, and all the ampersands and replace them with & and all those other little bits. Surely there must be a way of automaticificating that?

trigger_tre
10-26-2007, 12:40 PM
This is actually a very interesting question. Would be a very useful tool as well.

I recently gave someone access to a folder on my website so they could maintain a monthly newsletter. He is new to XHTML coding so I know that forgetting to validate with proper characters is something that will occur. Especially when there are some characters you rename (&, "" , >,<) and then some you don't ( _, $, %, @). For a beginner this can be confusing and from my own experience usually the last thing you worry about when your still in the beginning stages.

-trigger

_Aerospace_Eng_
10-26-2007, 01:36 PM
I think it already does it.
Under Edit > Preferences > Code Rewriting > Check box next to Special Characters.

It seems to only convert them if you paste the text into the design view window.

Actinia
10-26-2007, 06:20 PM
Try my XPFilter at http://www.actinia.me.uk/XPFilter/XPFilter.php.

This will upload the 'html' output from WordXP 'Save as html' and strip out all the nasties, and convert most of the peculiar character codings.

I would welcome any feedback on this.

John Rostron



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum