[CS3 JS] Copying contents with styles

What's the best way to copy contents and keeping styles (and other attributes)?
In this case it's the contents of a table cell I would like to get into a text frame, with its style information untouched.
(Not using the clipboard.)
Best regards,
Andreas Jansson

According to the ESTK Help, there is:
Text duplicate (to: LocationOptions[, reference: {Text | Story | Cell | Row | Column | Table | PageItem} ])
Duplicates the text in the specified location.
Parameter
Type
Description
to
LocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
The location relative to the reference object or within the containing object.
reference
Text
Story
Cell
Row
Column
Table
PageItem
The reference object. Note: Required when the to parameter specifies before or after. Can accept: Text, Story, Cell, Row, Column, Table or PageItem. (Optional)

Similar Messages

  • [AS] CS3- Find any text with style, then replace that text with a new applied fill color.

    I am trying to find the simplest way in cs3 to find any text with style, then replace that text with a new fill color. I can find text and change text. I can find a style and change it to a new style. I can't seem to find a style and change the applied fill color. I do not want to change the properties of the style, just the applied color. Yes, I want the + sign, for now. I know, why not update the style, I am not allowed to. Any help would be great. Since the search is not available, I need a new response.
    Thanks.

    You can work around the bug by just doing a find, then looping through the<br />results, changing the color one at a time. It'll be a fraction slower, but<br />should do the trick:<br /><br />tell application "Adobe InDesign CS3"<br />    set find text preferences to nothing<br />    set properties of find text preferences to {applied paragraph style:"The<br />name"}<br />    set theFinds to find text document 1<br />    repeat with i from 1 to count of theFinds<br />        set properties of item i of theFinds to {fill color:"Replace color"}<br />    end repeat<br />end tell<br /><br />The bug is fixed in CS4, BTW.<br /><br />-- <br />Shane Stanley <[email protected]><br />AppleScript Pro Florida, April 2009 <a href=http://scriptingmatters.com/aspro>

  • JTextPane cut,copy & paste with styles

    When you cut, copy & paste with JTextPane, it doesn't include the styles. Has anyone have an example of extending the DefaultEditorKit.CutAction class for example to include this extra behaviour?
    Thanks
    Abraham Khalil

    http://forum.java.sun.com/thread.jsp?forum=57&thread=197091Thats the thread I was think of. Look at the code found at the link of reply 4.

  • How do I create a table of contents with a nested style paragraph?

    I'm having difficulty figuring out how to generate my Table of Contents with a nested style. In this screen shot, "SPECIAL EVENTS" is considered level one and the pink circled "Fittest Firm Challenge" is level 2. Because it is a nested style, it is picking up the entire paragraph. I don't want to put in a paragraph break because that would add too much space in the magazine since there are a lot of other listings like this. I've tried reading through other people's discussions but I'm totally lost with the explanations. Is there a simple workaround or solution to this?

    apricotanna wrote:
    I'm having difficulty figuring out how to generate my Table of Contents with a nested style. In this screen shot, "SPECIAL EVENTS" is considered level one and the pink circled "Fittest Firm Challenge" is level 2. Because it is a nested style, it is picking up the entire paragraph. I don't want to put in a paragraph break because that would add too much space in the magazine since there are a lot of other listings like this. I've tried reading through other people's discussions but I'm totally lost with the explanations. Is there a simple workaround or solution to this?
    You're asking InDesign to do something it's not designed to do, namely, to treat a nested-style section of a paragraph as an independent paragraph. That's called a "run-in paragraph" in Adobe FrameMaker, and it's been a beloved feature there since FrameMaker was introduced in '89, about ten years before InDesign.
    You can make a formal feature enhancement request here: Wishform Many InDesign features have come into being from user requests, so lend your voice, and be patient. Explain why you think a run-in paragraph feature would be useful.
    Others have asked about this, and there are a number of workarounds that may or may not be suitable for you. Let's hope that some of the more-intense forum folks can help you with a useful search term for this forum, so that you can review what's been suggested and tried in the past, and what results you can expect.
    In the meantime, you might consider inserting the second-level heading in an inline anchored text frame in the paragraph. It will be an independent paragraph but you can adjust appear on the same line as following paragraph. Then you can extract it for the TOC.
    Here's an example:
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • How do you block copying of content with createPDF??

    new user
    how do you block copying of content with createPDF??

    You'll need Acrobat Std. or Pro. to set security on a PDF document that disallows copying of the content.

  • RH 8 crashes on Save All when copying content between two open projects

    [Win XP SP2] I've submitted a bug report for this issue. Note that RH does seem to save the content as it's dying (a very noble act, I must say), but the behavior is bothersome.
    ******BUG******
    With two instances of RH8 running (dual monitors), and copying content from one project to another, the instance receiving the added content crashes when you click Save All.
    Steps:
    1. Open RH 1
    2. Open RH 2
    3. Copy content in RH 2 and paste it into RH 1
    4. In RH 1, click Save All
    Results: RH 1 crashes (RH 2 does not)
    Expected Result: RH 1 does not crash

    I would try another one with each of these documents.
    Create a new document with 2 pages.
    Name the master pages so, that their names are not conflicting with neither of these 2 document’s masters.
    Delete every style in that empty document, also any swatch
    No drag the pages of the first document into such an empty document.
    Do the same step 1 to 4 with the second document in a NEW empty document.
    Now you have 2 new documents. Take care that no conflicting master names appear.
    In each of these documents create in each style panel a folder and drag all used styles in that folder.
    Save both documents
    Try again to insert the pages of both documents.
    Otherwise, it this does not work out, could you send me via private message the files or a link. I would check it with a Debugging Version of InDesign (InDesign DEV) I can use to find errors.

  • Copy and paste styles between objects and entire slides

    Hi,
    In Keynote 5 I was able to copy and paste styles between objects and even between entire slides.
    cmd+alt+c on one object (like a circle) and all its details like shadows, colors and animations could be transferred to another object.
    One could even do it with entire slides and transfer one animation style to all the other slides.
    THAT DOES NOT WORK ANYMORE.
    Does anybody else miss these features?
    Or is it just me?

    object animations tools are:
    copy animation:   Format > Copy Animation
    paste animation   Format > Paste Animation
         there are no keyboard short commands for these.
    There are no tools to copy or paste transitions between slides, you could duplicate the slide then add the content.

  • Spry Tabbed panels + Progressive Enhancement and Dynamic Loading of Content With Spry

    Is there any way to combine tabbed panels together with "Progressive Enhancement and Dynamic Loading of Content With Spry"?
    Visit: http://labs.adobe.com/technologies/spry/articles/best_practices/progressive_enhancement.ht ml#updatecontent
    And click on the "Using Spry.Utils.updateContent()"
    The 3rd example shows how to use a fade transition whenever the content changes.
    I already have tabbed panels. My menu contains buttons (on tabs) and my Content div contains the panels.
    Tabs code;
    <ul class="TabbedPanelsTabGroup">
              <li class="TabbedPanelsTab">
                   <table class="Button"  >
                        <tr>
                        <td style="padding-right:0px" title ="Home">
                        <a href="javascript:TabbedPanels1.showPanel(1);" title="Home" style="background-image:url(/Buttons/Home.png);width:172px;height:75px;display:block;"><br/></a>
                        </td>
                        </tr>
                   </table>
              </li>
    etc
    etc
    etc
    and the panel code:
    <div class="TabbedPanelsContent" id="Home">
         CONTENT
    </div>
    I hoped i can use the example code from the link into my tabbed panels.
    I thought this code:
    onclick="FadeAndUpdateContent('event', 'data/AquoThonFrag.html'); return false;"
    could be added to the tab code like this:
    <a href="javascript:TabbedPanels1.showPanel(1);" onclick="FadeAndUpdateContent('event', 'data/AquoThonFrag.html'); return false;" title="Home" style="background-image:url(/Buttons/Home.png);width:172px;height:75px;display:block;"><br/></a>
    But the content doesnt fade...
    I know i need to change the header etc.
    The following is from the link:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Aquo Events</title>
    <script src="../../../includes/SpryEffects.js" type="text/javascript"></script>
    <script src="../../../includes/SpryData.js" type="text/javascript"></script>
    <script type="text/javascript">
    <!--
    function FadeAndUpdateContent(ele, url)
    try {
         Spry.Effect.DoFade(ele,{ duration: 500, from: 100, to: 0, finish: function() {
              Spry.Utils.updateContent(ele, url, function() {
                        Spry.Effect.DoFade(ele,{ duration: 500, from: 0, to: 100 });
    }catch(e){ alert(e); }
    -->
    </script>
    <style type="text/css">
    /* IE HACK to prevent bad rendering when fading. */
    #event { background-color: white; }
    </style>
    </head>
    So i changed my header etc, put the SpryEffects.js and SpryData.js into position and nothing changed...
    Is there a way to keep my tabbed panel (or change as less as possible) and let
    A. The fade work
    B. The loading work.
    The problem now is that it loads all pages instead of only the home. Therefore i wanted this Progressive Enhancement.
    And the fading part is just because its nice...

    It doesnt show in the post but off course i changed this link;
    "data/AquoThonFrag.html"
    into;
    "javascript:TabbedPanels1.showPanel(1);"
    I must say i dont know if this even works...

  • How can I resize a pdf page content with annotations and highlights in Acrobat Pro?

    How can I resize a pdf page content with annotations and highlights in Acrobat Pro while maintaining page size and annotation/highlight interactivity? I've tried to use the crop tool in Acrobat Pro (9) and the page does resize, but the highlights and annotations go all over the place. I specifically need to scale the page content smaller (83%) but maintain page size and annotation/highlight to content connection and interactivity.

    An old trick (not recommended) would be to print to a new PDF with the page size selected but a scaling of the content. Only print the document, not the markup, to a new PDF. Close that PDF when done and reopen the old one (or maybe a copy of the old one for safety) and use Document Replace pages and select the new document to replace your current pages. You will then have to go back through the markup to locate it all correctly. There may be a more elegant way, but this may be the fastest.

  • Is it possible to copy formats and styles from one document to another?

    Is it possible to copy formats and styles from one document to another?
    Or use a commen styledocument as a masterdocument?

    Only by creating a template with what you want.
    Apple has removed the ability to import styles inPAges 5 along with almost 100 other features.
    Peter

  • How do I copy content from an entire row into a different table?

    How do I copy content from an entire row of one table into a different table?  When I try to copy/paste the selected row into a row of the same size  and configuration in another table in the same document, the cells change width, the formatting and border thicknesses change, and the text gets squeezed.  When I was working with tables in Microsoft Word, there was no problem selecting text from a row in one table and placing it into a similar row and configuration in another table.

    Hi Christopher Morgan
    And welcome to apple discussions. With regard to your main question ....
    Q: Can this be done?
    A: It can but not easily (in that you may take a hit in quality). Apps like MpegStream Clip or DVDXDV may help:
    http://www.dvdxdv.com/NewFolderLookSite/Products/DVDxDV.products.htm
    It converts it back to a QT file for use with iDvd (or iMovie).
    Hope this helps but if not just come on back.
    Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software / products that may be mentioned in this topic. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information above at your own discretion.

  • How come I can't copy content in Firefox and paste it into Word and it keep it's formatting?

    When I copy content off a web page in Firefox and paste it in Microsoft Word, I lose the original formatting. It works fine in IE but I'm wanting to eliminate IE but I can't at this time because of this problem....

    That is a problem with the clipboard. Firefox now places more formats on the clipboard and some software selects the wrong format.
    See:
    *[[/questions/926113]]
    *[[/questions/926093]]

  • FM 8 hangs after copying content

    I am working on FM 8. It hangs when I try to copy content.
    Please let me know if anyone is facing a similar problem and steps to solve it.

    The problem may be as simple as uninstalling Skype, which messes with the clipboard.
    No Skype? Ok, next is:
    32- or 64-bit Win7?
    FM8 is probably not officially supported in Win7, and may have issues in 64-bit mode on any Windows.
    If you have Win7 Enterprise, Professional or Ultimate, you could download "XP Mode", and try running FM8 in a 32-bit XP virtual machine. If you have Win7 not-so-Premium or less, you can't install XPM.
    And do you see the problem just using keyboard shortcuts (e.g. Ctrl-C), or also using menu Edit > Copy?

  • Problems with style sheets

    I switched to Pages about one year ago because I then found that style management was easy and straightforward compared to Word. I updated to Pages V2.0 in January and since then I have been annoyed with the new way style sheets are managed.
    In V1.0, when copying / pasting text from Word to Pages, styles would not been copied leave the style sheet clean.
    Now, when copying / Pasting text from Word to Pages, the whole Word style sheet is copied in Pages (whatever paste option is used) messing everything around
    I believe this is a bug but I did not get any straight answer from Apple support. Do you face the same problem? Does anyone have a work around?
    Cheers.

    Philippe,
    actually it will indeed be the easiest to remove the Word styles when you're finished with your text.
    You should be aware that Pages will ask you for a style to replace the one you're deleting, if that style is still assigned. If you Paste and Match Style, this shouldn't be a problem.
    I wouldn't number Pages styles but use a prefix, e.g. "pg_". This will still keep the sorting you're probably now used to. A prefix is also usefull if your Pages styles use numbering (text style) since Pages automatically adds a number in front of the style name. This could lead to some confusion.
    Additionally, you should, as suggested by dwb, send feedback to Apple and ask to change the behaviour of Patch and Match Style.

  • Setting html content with setContent() does never show images

    I've an application set sets dynamically generated html-content in a webview node by using the webengine.setContent() method. This generated html content uses image-tags.
    Here's the problem: the image is not displayed. I tried all variations (absolute url like "http://localhost/c:/test.png" or "file://c:/test.png", relative urls like "test.png" with png in jar-file).
    Anyone out there who has a workaround for me? I appreciate any comment.

    one non-working apple <img src="apple.png"> You loaded the page content with loadcontent, then inside the page content provided a relative url. This is likely an error.
    The question is, what is this url relative to?
    The answer is either likely undefined as no protocol was used to load the page content and so it can't be determined how to load the relative url resource.
    and two non-working peaches <img src="http://localhost/c:/peaches.png">
    You attempted to load content using the http protocol server on the localhost, but you have no such server on the host, so this cannot work.
    and a working remote image url <img src="http://docs.oracle.com/javafx/javafx/images/javafx-documentation.png">
    This works because you fully specified how to load the content by providing the protocol and valid resource reference.
    OK, so the question remains how do you images from the local drive?
    There are three options for this in the following code.
    package org.jewelsea.examples.webviewlocal;
    import javafx.application.Application;
    import javafx.beans.value.*;
    import javafx.scene.Scene;
    import javafx.scene.layout.FlowPane;
    import javafx.scene.web.WebView;
    import javafx.stage.Stage;
    /** Example of a webview loading resources from the file system. */
    public class WebViewLocal extends Application {
      public static void main(String[] args) throws Exception {
    //    URL.setURLStreamHandlerFactory(new HandlerFactory());
        launch(args);
      public void start(final Stage stage) throws Exception {
        final FlowPane layout = new FlowPane();
        WebView webView = new WebView();
        webView.getEngine().load("file:///C:\\dev\\gettingstarted\\timeforgotten.html");
    //    webView.getEngine().load("jar:file:///C:\\dev\\javafx\\JavaFXidea\\out\\artifacts\\JavaFXidea_jar\\JavaFXidea.jar!/org/jewelsea/examples/webviewlocal/timeforgotten.html");
    //    webView.getEngine().load("resource:///org/jewelsea/examples/webviewlocal/timeforgotten.html");
        webView.getEngine().getLoadWorker().exceptionProperty().addListener(new ChangeListener<Throwable>() {
          @Override public void changed(ObservableValue<? extends Throwable> observableValue, Throwable oldThrowable, Throwable newThrowable) {
            System.out.println("Load exception: " + newThrowable);
        // layout the scene.
        layout.getChildren().addAll(webView);
        Scene scene = new Scene(layout, 1000, 600);
        webView.prefWidthProperty().bind(scene.widthProperty());
        webView.prefHeightProperty().bind(scene.heightProperty());
        stage.setScene(scene);
        stage.show();
    }which loads the following html file:
    <html>
    <head>
      <style type="text/css">p { color: sienna; font-size: 20px; text-align: center; }</style>
    </head>
    <body bgcolor="cornsilk">
    <p><em>
        <br/>
        On either side the river lie,<br/>
        Long fields of barley and of rye,<br/>
        And through the fields a road runs by,<br/>
        To many towered Camelot.
    </em></p>
    <p><img src="camelot.jpg"/></p>
    </body>
    </html>If you want to test this example the camelot.jpg image is downloadable from http://www.timelessmyths.com/arthurian/gallery/camelot.jpg.
    Option 1: The file:// protocol for lookup from the filesystem.
    This is the most straight-forward as it is just based on standard html layout in the filesystem - just place your html and it's relative referenced images somewhere in your filesystem in locations relative to each other - if your browser loads it properly, then your webengine will to if you give it the right file:// path.
    In the case of file:///C:\\dev\\gettingstarted\\timeforgotten.html, timeforgotten.html is placed in c:\dev\gettingstarted and camelot.jpg image is placed in the same directory.
    Option 2: The jar:file:// protocol for lookup from a jar hosted on the filesystem.
    This makes use of the http://docs.oracle.com/javase/7/docs/api/java/net/JarURLConnection.html to find your resources.
    If your application resources are packaged in a jar file (could be the same jar file as your main application class) then you can reference the jar file through the file protocol, then pick out the resources packaged in the jar file via their relative paths.
    Option 3: The resource:// protocol for lookup based on the classpath.
    This type of resource lookup is the one most Java programmers are familiar with - a classloader is used to load a resource. The pattern is widely used in web application frameworks on the server. But usually the means to do this is via a classloader.getResource() call, not via a URL.
    Java does not, by default, have a URL protocol handler for looking up resources on the classpath, so if you want to do this, it is necessary to create your own protocol and install it.
    The installation function is the commented out line: // URL.setURLStreamHandlerFactory(new HandlerFactory());
    It is a system wide call for the VM and should be called (just once) before any URL Connections are established.
    To get this to work I used a resource handler from http://www.arakhne.org/arakhneVmutils/index.html which included the following classes:
      java.org.arakhne.vmutil.resource.Handler
      java.org.arakhne.vmutil.resource.HandlerFactory
      java.org.arakhne.vmutil.resource.URLConnection
      java.org.arakhne.vmutil.ClassLoaderFinder
      java.org.arakhne.vmutil.Resources
      java.org.arakhne.vmutil.ResourceNotFoundException
      java.org.arakhne.vmutil.URISchemeType
      java.org.arakhne.vmutil.URLHandlerUtilDetails on how all this works are in http://java.sun.com/developer/onlineTraining/protocolhandlers/ which defines "A New Era for Java Protocol Handlers" by defining a URL handler extension mechanism which is hardly ever used.
    As a final note to my way overly long forum post, when the WebEngine doesn't process the urls sometimes you can get info on what went wrong via the monitoring the loadWorker's exception property, but sometimes I was able to get more complete stack traces by trying to open a connection on a URL to see if I had got the URL correct - for example:
        URL url = new URL("jar:file:///C:\\dev\\javafx\\JavaFXidea\\out\\artifacts\\JavaFXidea_jar!/org/jewelsea/examples/webviewlocal/timeforgotten.html");
        url.openConnection();Anyway, just using the file:// protocol in webEngine.load() will probably accomplish what you need.
    Note that if it is a webstart or browser embedded app, then you'll need to sign it if you want to access the local file system.

Maybe you are looking for

  • Problem with PowerPoint import

    Hi , When I import an PowerPoint slide in Arabic Language to my project its characters changes to Left to Right format and its face crash into bad form . Can I correct them ?

  • Best way to update apps like Java and Adobe?

    Hi guys I just wanted to get some feedback on how best to deal with updating Java and Adobe. Of course a lot of this will be opinion and circumstance, but feedback would be useful. The 3 methods I am focusing on here is SCUP, the App model and the Pa

  • Apple mail will not quit

    always hangs at closure steve

  • Update From NON Intel

    My iPhoto Library is on an external HD due to its size. With my new Intel Mac (when I buy one) will I continue to be able to use/see that Library on the external HD used by the old non Intel Mac? (I imagine it will "encourage" me to start a new Libra

  • Can't Open any non-code files from "Local" site list

    Dreamweaver 8. . . When attempting to open any file type from the local file list (.pdf, .doc, .docx, .xls, .mdb, etc.), I get a "Can't find a valid editor for this file extension". I can browse to the application and open it that way, but it doesn't