Pasting text from Word into Apex Textarea

Hi Folks,
I have a client that wanted to transform their Word forms (something like customer survey) into Apex screens.. every thing went great but they noticed that when they try to copy text from the Word forms into Apex textareas some characters will show as an up-side-down question mark. Some characters are the apostrophe , consecutive dots (...) and so on. I don't know what is the best way to handle that, I am thinking about writing a function that escapes those characters for a passed text and add up decoding to it every time users encounter a news bad character..but maybe somebody has a better idea...
Thanks,
Sam

We had the same problem. If you can't update the character set, which is usually a big deal, then you can always use javascript to change the textfield or text area before the user clicks save. We have onchange events on all of our items to catch when an item saves and sets a flag to do an autosave when the click somewhere else in the application. You could use a similar function to translate the characters on the browser before they hit the database.
If you're going to be searching on this data, you probably don't want to store the special characters anyway. They will have to type in the characters to search and some of the MS characters can be misleading and cause them to not find what they're looking for.
The array configured_values is a string array where the first index is the bad character and the second index is the value to replace it with
function madeChange(e)
{ document.getElementById('P0_MADE_CHANGE').value='TRUE';
     if(e)
          var string = e.value;
       //If it is a text-area or a text-field
       if(isNaN(string))
       {  var aux;
          for(i=0; i<(configured_values.length)-2;i=i+2)
          aux= eval('/' + String.fromCharCode(configured_values) + '/' + 'g');
string=string.replace(aux,configured_values[i+1]);
     e.value=string;
Edited by: YodaHart on Jul 21, 2010 10:18 PM

Similar Messages

  • Problem pasting text from Word into Mail

    When I compose text in Word and paste it into Mail, paragraphs are separated by spaces that weren't in the original Word document and I have to do a lot of work to get rid of them. If I compose or paste the text in TextEdit and then copy the message into Mail, there's no problem. Is there a fix so I can just compose my messages in Word and then transfer them into Mail?

    Edwin Bernbaum wrote:
    It happens when I use past and match style as well. Any other ideas?
    Last month I started a message thread on what may be the same issue:
    http://discussions.apple.com/message.jspa?messageID=11083007
    There's a mention there of the Mail menu option Format -> Make Plain Text, which may help you.
    I filed a "bug report" with Apple (http://www.apple.com/feedback/macosx.html) about quirky spacing in Mail messages and the lack of any editing feature to control such spacing. Maybe you'd want to do the same.

  • Pasting text from word replaces Keynote styles

    I get documents that are styled in Word that I have to convert to Keynote. Even though my text boxes are styled in the Master Slides, when I copy and paste text from word it comes in with all of word's formatting and disregard's Keynote's styling for that text box. I tried to convert the word docs to rtf or just plain text, but the text just imports without Keynote's styling applied to it. It would be very tedious to have to style each text box as I bring it in to Keynote. Does anyone have any suggestions to make the workflow less painful?
    Thanks
    randini

    Welcome to the discussions, marc01.
    I don't have Omni Outliner to test with, but that does sound like something that's worth looking into. Send feedback to Omni at their site and to Apple with this link.
    http://www.apple.com/feedback/keynote.html

  • Cp5 - Pasting text from Notepad into a text box

    I posted this message in the "Getting Started Forum" but there isn't a whole lot of activity in that forum.
    Hopefully someone can help me because I have a lot of text to paste into a lesson.
    This  seems like such an elementary requirement and I am almost certain that I  have done this before but...for some reason, copying text from Windows  Notepad into a Captivate 5 text box just isn't working today.
    Basically, the paste option is simply not available!
    Yes, I can copy paste into other applications; Captivate is the only application that is blocking this Windows function.
    If  I insert a Text Entry Box, I am able to paste single lines of text  (from Notepad) but obviously this isn't going to work as a text box.
    Is this by design or has something gone haywire?
    Question, how do I get pre-written text (i.e. from Notepad) into Captivate?
    Thanks

    Shawn,
    I have had that happen to me too.  I am always copying and pasting into my Captivate projects.  But sometimes the paste option is just not available.  What I have done, is to save everything and close the application and start it again.  Seems there's a lot of little irritating things like that with Captivate, that's corrected with a restart.  Hope this helps!
    Linda
    >>>
    From: shawninvancouver <[email protected]>
    To:Linda Highlander <[email protected]>
    Date: 8/3/2011 10:44 AM
    Subject: Cp5 - Pasting text from Notepad into a text box
    I posted this message in the "Getting Started Forum" but there isn't a whole lot of activity in that forum.
    Hopefully someone can help me because I have a lot of text to paste into a lesson.
    This  seems like such an elementary requirement and I am almost certain that I  have done this before but...for some reason, copying text from Windows  Notepad into a Captivate 5 text box just isn't working today.
    Basically, the paste option is simply not available!
    Yes, I can copy paste into other applications; Captivate is the only application that is blocking this Windows function.
    If  I insert a Text Entry Box, I am able to paste single lines of text  (from Notepad) but obviously this isn't going to work as a text box.
    Is this by design or has something gone haywire?
    Question, how do I get pre-written text (i.e. from Notepad) into Captivate?
    Thanks

  • Pasting Text from Word to InDesign (need preserve selected formatting)

    When I import text from Word to Indesign I want to preserve the Italic and semi-bold but nothing else.
    The Indesign document has a template set up with ipsum text styled with semi-bold and normal text as well as a character style for the italic.
    When I paste the text into InDesign I want the ital and semi-bold to translate into the already styled text frame with no other formatting from Word.
    As there will be hundreds of text frames like this I want the ital etc to automatically translate. I also need to paste text over these templated text frames (see attached.
    Cheers,

    Use File > Place and check the import options instead of Copy/Paste.

  • Auotmating Text from Word into InDesign

    Here is my situation: I am the graphic artist and layout person for the company that I work for.  We produce layouts that have a pretty consistent format.   Each layout has definite text sections.  These text sections are written by the research editor and put into a single word document.  I then have to copy and past the various text sections into the layout in InDesign.
    I know that if my Research Editors worked in InCopy it would elminate the need for me to copy and paste the text from word doc into the the layout document.  The problem is that one of the editors is a contract worker that is outside the office.
    I was wondering if there was some way to set up a template in word.  The idea would be that once the document is finished it could be imported into InDesign in a way that it would automatically populate the the text sections in the layout.

    Well you know what I mean, by copy and paste.  I place the text in first to preserve the formatting.
    This seems backwards, to me. Is the "formatting" in the Word document based on styles? If it is, you can map your InDesign styles to your Word styles on import. If it's not, then I find it much faster to change the formatting into styles immediately upon import.
    If you're not using any defined styles at all in your InDesign document, then yeah, I guess that copying and pasting is faster and a better way to preserve the manually applied formatting in Word. But why do that, when using well-defined styles in ID can be significantly faster?

  • Freeze when copy paste text from word to Indesign CC

    Hi,
    I have a problem when working with indesign CC. When i'm copying text from word to Indesign, after a while my windows system freezes. Only Indesign works. Windows and word are frozen. After a while (several minutes) the system works agian.
    This problem occurs sinc I have Indesign CC.
    Windows 8, indesign CC, Word 2013
    I hope someone has a solution.
    Ragards Bas

    It's the PDF.
    Usually, you can copy text out of a PDF, but there is no guarantee *at all*. Older software used to take shortcuts to subset fonts: first character it encountered got coded as #1, the next as #2, etc. etc. If you do a search & replace of each of the nonsense characters, you'll slowly see the original text appearing (thst's not as simple as it sounds, though).
    A similar "problem" is that sometimes spaces don't get copied (there is no need for a "Space Character" in a PDF), and that you cannot copy contiguous lines of text as a single paragraph. All of it is because a PDF is not intended nor designed to be re-used after creation.
    If you really need this text and don't want to type it in, try to get hold of the original file.

  • Copy and paste text from Word for Mac to Mail exasperating!

    I'm so exasperated!! I would be grateful for some help.  I have a carefully worded template letter in Word for Mac.  I copied and pasted it into Mail and loads of extra lines are put in that I cannot delete! So I painstakingly copy and paste each line.  I still have to faff about deleting extra lines that magically appear, then press shift+enter to go to next line without having a line space.  It has messed up font size as well.  Surely it should be straightforward to copy and paste simple text from one program to another!  Is there something I should know or do I just have to type everything out afresh each time - ridiculous in this so called easy technology that saves work ha ha. 

    The supported elements are defined in the XFA spec
    http://partners.adobe.com/public/developer/en/xml/xfa_spec_3_3.pdf

  • Copy/paste text from Word doc or PDF to Robohelp

    Bolded words, indentions, paragraphs, line spacing, font, and
    text size amongst other things are lost when I do a simple
    copy/paste... Any way to relieve this?
    Thanks

    Hi
    I'd like to answer this in a slightly different way..
    It's a good idea to format anything you paste into RH in RH
    using paragraph styles etc. Hardcoded formatting won't be under
    stylesheet control which is very bad news.
    In fact I generally paste stuff from a word doc into notepad
    first to remove any formatting soI have "clean" text to begin with.
    That way you ensure consistency when styles are updated etc
    as well maintaining consistency with what's already there.

  • Importing text from word into indesign3

    I am importing text from a word document that has lots of footnotes in it into an indesign3 file  - I need to keep some of the formatting from the word document i.e italics and tabs however I need to be able to edit and reposition the 'word' footnotes within indesign - I don't seem to be able to do this without turning off the footnotes editing completely before importing? Is there a way around this?

    Word is wordprocessor. iWeb is an application to create webpages with.
    Copy/pasting formatted text always has unexpected results.
    To overcome that, save your Word document as a html file.
    Open it in a browser and then copy/paste the text.
    iWeb will retain the formatting.
    And Lion is an operating system. Just like a Mercedes is a car. Neither has anything to do with your problem.

  • Pasting tables from Word into Dreamweaver MX

    Hi everybody,
    Did a search for this but didn't find anything.
    I used to be able to paste tables (or individual rows and
    columns) from Word XP directly into a Dreamweaver MX table.
    Yesterday, I had to reinstall Dreamweaver MX due to a computer
    crash and now can no longer paste in Word tables.
    The rows or columns being copied simply delete the
    Dreamweaver table and get pasted as text only.
    Am i missing something like a patch or an update? Is there an
    option or preference that can be set?
    Any suggestions would be greatly appreciated.

    Thanks speculumcm.
    However, Dreamweaver MX does not have a Copy/Paste option
    under Preferences.
    I have noticed that after the Word table gets pasted as text
    (deleting the Dreamweaver table in the process) the Edit option to
    undo says "Undo Paste as Text" and not "Undo Paste".
    It is possible that somewhere there is a 'Paste' option set
    to 'Paste as Text' and not 'Paste the Object'?

  • Outlook 2010 freezes when pasting text from email into filename

    I use Microsoft Outlook 2010 (32-bit version), in a 64-bit computer (Dell laptop) using Windows 7 Enterprise, SP1.  (I work in a company and can't change what version of the Outlook program I am using.)  If I copy text out of an Outlook email,
    and then go to save the email by printing it to a PDF file using Adobe Acrobat X Professional, and I try to paste the copied text into the file name I am typing for the email being saved/"printed", then Outlook freezes on me.  I've
    noted that I can copy text from other programs (such as WordPerfect X3 or Adobe PDF files), and successfully paste them into the file name without Outlook freezing.  I can also copy text from an Outlook email, paste it as plain text into a WordPerfect
    X3 document, and then copy that same text again out of the WordPerfect X document, and I am able to successfully paste the text into the file name of the email I want to save without Outlook freezing (i.e., moving the text out of Outlook and then back
    again to Outlook somehow sanitized the text so it wouldn't freeze Outlook).  Note that my office switched from Windows XP to Windows 7 a few weeks ago, and I also received a clean installation of Office at that time.  This problem did not exist prior
    to the change to Windows 7.  Does anyone know what is causing the problem?  Is there some setting I need to change in Outlook?  (Maybe I had the Outlook setting correct in the old installation of Outlook, but the new Outlook installation wiped
    out my prior settings, and the new default setting recently installed is creating the problem?)

    Hi,
    First please make sure your Office is up-to-date.
    I suspect this may be related to some 3rd-party add-ins or the security software, first please run Outlook in Safe Mode to determine if 3rd-party add-ins are related:
    Press Win + R and type “outlook.exe /safe” in the blank box, then press Enter.
    If there’s no problem copying and pasting in Safe Mode, disable the suspicious add-ins to verify which add-ins caused this issue.
    Please also disable the anti-virus program temporarily to check if this makes a difference.
    Regards,
    Melon Chen
    TechNet Community Support

  • I can't copy and paste text from Word to a Facebook Post since I've been using Firefox. Why am I getting the background code? Internet Explorer lets me copy text from Word to Facebook.

    I type my text in Word then open Facebook. I press Control-C to copy this text into my Facebook post and the result is that a lot of background code shows up.

    I would use the older version so you can continue working while troubleshooting continues in CC2014, if you haven't uninstalled it yet (and it didn't also lose the ability to copy/paste).
    Have you tried any of the usual suspects?
    Clear program cache and/or rename config folder: Deleting a corrupted cache file
    Restore Preferences: Restore preferences | Dreamweaver CS4, CS5, CS5.5, CS6

  • Pasting text from Word

    I would like to paste text into a Dreamweaver document. It
    apparently does not recognize paragraphs. Is there a way I can do
    this? I know I can do it manualy but would be a pain as there will
    be 100 pages involved.

    Be glad for what you get, then. DW3 is well beyond "long in
    the tooth" and
    is approaching "mouldering in the grave".... 8)
    Paste and edit is about the best consolation I can offer.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "dglas_1" <[email protected]> wrote in
    message
    news:ek4oit$hb4$[email protected]..
    > John,
    >
    > I am using an old version - Dreamweaver 3

  • Importing and retaining greek text from word into IndCS3

    Have a word document in Greek. Word file is in Times New Roman and views in word correctly as font is loaded. I wish to import into Indesign CS3 and format accordingly, but, when I do it does not keep greek language it comes in as all pink missing text. Have tried selecting greek language in character palette but does not fix problem. Does anyone have any suggestions?
    thanks
    sonja

    >Have tried selecting greek language
    What would you expect from that? Auto-translation?
    >all pink missing text
    That's a visual clue, not meant to indicate "missing text" (how would ID know that it's missing?), but rather that the characters used in the text are not in your current selected font. Select another font -- which
    i has
    Greek characters --, and you'll be fine.

Maybe you are looking for