Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts

    Dreamweaver CS3: HTML-ifying pasted text?

    One of the things I find myself spending a lot of time doing runs like this:
    • Client sends copy in Word doc (or email )
    • 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 )
    • 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

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    DW actually has a "Clean Up Word HTML" under the Commands menu.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #3
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    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?

  • #4
    Regular Coder
    Join Date
    May 2006
    Posts
    290
    Thanks
    6
    Thanked 14 Times in 14 Posts
    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

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    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.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #6
    Regular Coder Actinia's Avatar
    Join Date
    Feb 2007
    Location
    Essex, UK
    Posts
    250
    Thanks
    1
    Thanked 23 Times in 22 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •