Hw could copy a unformatted text from a formated paragraph

Dear all,
I am trying to copy an unformatted text from a formatted paragraph i have a code snippet, Please check it out and tell me that how can i copy a unformatted text from a paragraph. Result of this script should be a unformatted selected text...
var par = app.selection[0].paragraphs[0];
    if (app.selection[0] instanceof InsertionPoint)
        if (par.characters[-1].contents != "\r")
            par.insertionPoints[-1].contents = "\r";
            par.characters.itemByRange(app.selection[0], par.insertionPoints[-1]).select();
            app.copy();
        else
            par.characters.itemByRange(app.selection[0], par.insertionPoints[-1]).select();
            app.copy();

It's not the copy that 'removes' formatting, it's the paste that pastes without.
Text can exist on the clipboard in any number of internal formats. It's possible to copy InDesign formatted text and paste it into a plain text editor -- so you won't get the formatting. But if you paste the same text again in InDesign, the formatting is still there.
When copying, it's the responsibility of the copying program to put its copyable content in any useful format onto the global Clipboard.
When pasting, a program should go through the list of supplied data formats (regardless of the source) and pick whatever it thinks is best. So, apparently, the usual Paste picks up InDesign "Native objects", while "Paste w/o Formatting" uses the plain (unformatted) text form.
The only way to get an unformatted copy on the pasteboard would be to copy the string contents (raw ASCII characters) instead -- but InDesign's Javascript does not allow this. The app.copy() command only works on native InDesign objects.
So, long story short, what you need can't be done.

Similar Messages

  • HT4641 How do you copy and paste text from a website to a pages document please. I could do this on my old ipad but not with ipad air  thank you

    How do you copy and paste text from a website to a Pages document please. I could do this from my old ipad but not from ipad air. Thank you

    Welcome to the Apple Community.
    Why what happens when you try.

  • Preview - Cannot copy and paste text from pdf

    Hi there ...
    I usually have no problem copying and pasting text from a pdf using Preview ...
    However .. I recently received a pdf ... and there is no way it will highlight the text to copy ...
    The older pdf's are not affected ...
    I did a get info on the pdf ... it's not locked ... and it was made by Adobe In Design CS2
    I tried opening it with Adobe Reader 9 ...... but still no luck
    IN my search .. I noticed one other person had the same problem ... but he didn't get any responses..
    Thanks for any info ....

    If it's behind something else then you can open it in Illustrator and select the specific object you want. If it's rasterized then no.
    If this is a document you can share with the world then I'm sure we could tell you what specifically is going on if you posted it here.

  • Trying to copy and paste text from a pdf to a webpage

    trying to copy and paste text from a pdf to my iWeb edit page shows up as red lines,  only shows up on the website if I highlight it, please help

    If it only shows up when you highlight it, then it could be your font or your font color. Try changing both to a different font to see if that helps. If not, copy it into a word processor such as Microsoft Word, Pages, or Text Edit to see if it shows up there. If it does, try copying it again from the processor to your webpage.

  • How do I copy and paste text from a converted Word document?

    I just converted a pdf file into word.  I want to copy and paste the informatiuon into another document.  How do I do that?

    Hi Sara.  Tanks for responding.  If I cannot figure this out (I  was up
    until 2am last night), I want to cancel my subscription.
    Here are two files you can check on/help me with.  When I try again,  it
    comes up 'an error has occurred when trying to access the service.'
    Please advise.
    Pat Tomassi
    In a message dated 11/1/2014 12:55:23 A.M. Eastern Daylight Time, 
    [email protected] writes:
    How  do I copy and paste text from a converted Word document?
    created by Sara.Forsberg (https://forums.adobe.com/people/Sara.Forsberg) 
    in Adobe Acrobat.com Services - View the full  discussion
    (https://forums.adobe.com/message/6888908#6888908)

  • I'm in trouble with copy paste some text from Word to DW mx 2004

    I'am a new developer in webdesign. I'm doing my first site to
    a cliente. I'm in trouble with copy paste some text from Word to DW
    mx 2004. In the Edit / Preferences / General category i have the
    spelling dictionary in Portuguese (Brasilian). If I wrote the text
    in Portuguese directly from DW i can see the letters with ( ç
    ã é ... ) and in the browser testing ( IE 6.0.2 with sp2
    and FireFox 1.0.7 ), but with copy paste from the text in Word in
    Portuguese when i bring it to DW i can see the ( ç ã
    é ... ) in the beginnig but in the Browsers testing i can't,
    and then after a while i lose the ( ç ã o ...). Can
    anyone help me !?
    I need the work finish in next monday. Thanks a lot.

    Your line breaks will most likely be incorrect if you don't turn on the Japanese Composer.
    It is almost absolutely impossible to accomplish your goal without having a font - any font - installed on your system that has that glyph. However, if it's showing up in Word, than means that you must have that glyph installed, right? What font are you trying to use in InDesign? You might already know that Word will auto-substitute fonts when it encounters a missing glyph, so we really don't know what font is being used to render that one glyph. The whole sentence might be in MS Mincho but one glyph might be pulled from another font if MS Mincho doesn't have that glyph.
    That being said, you're going to break it if you don't know how to set Japanese type in ID. It's not something where you can just copy text out of email and paste into your English layout.

  • Why am I no longer able to copy and paste text from a website?

    I am trying to copy and past text from a website and it will not even let me select it.  I am very familiar with how to do this, and it worked yesterday on the same page in safari.  Please advise if anyone knows how to fix this.
    Thanks,

    Hi, Jrpaige7. 
    Thank you for visiting Apple Support Communities. 
    You can still copy and paste material from various applications in iOS 7.  Here are the steps on how to process these steps. 
    iPhone User Guide
    If you are experiencing issues with this functionality, I would recommend closing multitasking and power cycling the device. 
    iOS: Force an app to close
    http://support.apple.com/kb/ht5137
    Cheers,
    Jason H. 

  • How to copy and paste text from a web site viewed in Chrome using the Xperia z3v?

    I have searched high and low for a way to copy and paste text from a web site in Chrome using the Xperia z3v.  I've tried a long tap, a double tap, a triple tap - nothing works. I am able to select text, copy and paste it in a Word doc, however.  There must be some way to do this on a web site in Chrome. I'm certain I am not trying to select text that is really an image. I am trying to copy text. Here is the link where I'm trying to get the text. It's a recipe.http://www.foodnetwork.com/recipes/ree-drummond/mushroom-pilaf.html#! Maybe I should try to get Firefox for smart phones and see if that works. Any ideas?Thank you!

    Curnow 1 wrote the following:  "you should do a tap wait a sec and 1 more tap in the same place and hold the Second tap ;https://www.dropbox.com/s/23whtlt2gizxu27/MOV_1048.mp4?dl=0" Curnow1, this actually worked! Holy Cow, who'da thought?!!Thank you. I gave you a kudo and I marked this as a solution. Thanks again!PS - I'm amazed at how long it takes me to accomplish seemingly simple things with a smart phone. This is my first smart phone ever. I am a former computer programmer and am very PC literate. Still, sometimes I pull my hair out. Thanks again! 

  • Muse 3.1 crashes often upon copy and paste 'text'from illustrator

    Experience persistent crashes in Muse 3.1 whenever I copy and paste text from illustrator to  Muse.

    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

  • Why can't you copy and paste text from the Dictionary widget?

    I use this dictionary often, but I wish that I was able to copy and paste the text from it.

    Just use the Dictionary application in the Applications folder. You will have no problem copying and pasting text from the full application. I just tried it and it works fine.

  • Why cant I copy and paste text from my book thats in the library?

    Why cant I copy and paste text from my book thats in the library?

    MCWEB wrote:
    Can I Copy and Paste text from one Contact to Another on iPhone 3G?
    You will be able to do copy & paste when 3.0 comes out this summer.
    Or even better while the iPhone is connected to my PC can I view the address book on the iPhone and make changes using my PC keyboard?
    No. You would make changes to the address book on your PC and then sync via iTunes.

  • How to copy and paste text from one photo book page to another.

    hello,i downloaded this software 2days ago,and i've been having so much fun with it. pls i need help on how to copy and paste text from one photo book page to another. Secondly how to copy my completed photo book pages project to another laptop for printing. thanks
    This question was solved.
    View Solution.

    Hi DG.
    The easiest way to copy an HP Photo Creations project to another computer is to click the Share button. That will upload the project to the Web and give you a link you can paste into an email. Clicking the link on the other computer allows you to download the project and personalize it. This quick video shows the process. (The screen looks slightly different now, but the concept is the same.)
    Another way to share a project is copy the project folder to a thumb drive. Look in Documents/HP Photo Creations/My Things to find your saved projects.
    Our customer support team would be happy to walk you through the process. Contact them at [email protected]
    Hope this helps,
    RocketLife 
    RocketLife, developer of HP Photo Creations
    » Visit the HP Photo Creations Facebook page — news, tips, and inspiration
    » See the HP Photo Creations video tours — cool tips in under 2 minutes
    » Contact Customer Support — get answers from the experts

  • Can I Copy and Paste text from one Contact to Another on iPhone 3G?

    Can I Copy and Paste text from one Contact to Another on iPhone 3G?
    Or even better while the iPhone is connected to my PC can I view the address book on the iPhone and make changes using my PC keyboard?
    I had a challenge importing from my outlook as it created dual entries for people I had with multiple email addresses or telephone numbers so I need to copy and paste contact info from one to antoher.
    Can anyone help?

    MCWEB wrote:
    Can I Copy and Paste text from one Contact to Another on iPhone 3G?
    You will be able to do copy & paste when 3.0 comes out this summer.
    Or even better while the iPhone is connected to my PC can I view the address book on the iPhone and make changes using my PC keyboard?
    No. You would make changes to the address book on your PC and then sync via iTunes.

  • I have an iPhone 4s, and I cannot copy and paste text from facebook.

    I have an iPhone 4s, and I cannot copy and paste text from facebook. I opened Safari and tapped/held the text I wanted to copy, but nothing happened. I have tried everything, and I am getting frustrated.

    Are the use the correct email address for the contact? Those are listed in Settings>Messages>Send and Receive. When Messaging somene the iOS devices used the email address (or phone number if applicable) listed in the Contact app for that person.
    Thus, it appears the you Contact apps only has that one email address listed for the person you are trying to Message.
    If he can send you a Messages can you reply to it? If so save the sender to your Contact app.

  • I need to copy all my texts from my iPhone 5 to my new iPhone 6

    I have just bought the new iPhone 6 and I need to copy all my texts  from my iPhone 5

    You need to restore your iPhone 6 from the backup you made of your iPhone 5.

Maybe you are looking for

  • Sign out of MobileMe after migration to iCloud?

    Now that I've migrated to iCloud should I sign out of MobileMe (System Prefs>MobileMe>Account)?

  • Error showing when connecting to MySQL using servlet

    This is my Program. (MySQL.java) package coreservlets; import java.sql.*; public class MySQL {      public static void main (String[] args) {      String driver = "com.mysql.jdbc.Driver";      String url = "jdbc:mysql://localhost/leave_app";      Str

  • ImportXML: file vs. string ?

    Hello! I am working on some XML import solutions for work and have learned quite a bit!  I already have the basic XML import and XML rules written and it works great.  However, I have come to a point where I would like to parse a string into XMLEleme

  • What is backend for bw

    hi friends, we are using bw is data base for sap. what is the backend for bw. we are using oracle for backend. and other thins we are using backend for bw. Thanking u suneel.

  • Recommend a 3 party package for taking pictures from digital cam

    Anyone knows which package is good for that, or any solution. Thanks.