Resources on how to walk the DOM in InDesign?

I'm working on a script in which I want to move from the point of insertion or a group of selected characters to select the word where the selection is made. The parent object in this case is history or cell phone, not a Word. How do you know what word is in?

It made me realize that I have no idea how PointInsertion, character, Word, text, line, paragraph are related to another or how to move to the outside (or inside) during an attempt to expand or to collapse a selection to a particular in the document object.

Pointers to the diagrams or diagrams or even explain how these InDesign objects fit together and how navigate them when the selection is contained either by or contains the object you want to act on?

Model DOM of InDesign isn't quite as treelike as it seems at first. The property 'parent' can refer to several different objects depending on the context. It seems strange at first, but keep them home and after a while the experience takes place and (wel.. it will seem still strange when you stop thinking about it, but you will usually not stop)

To answer your original question:

myInsertionPoint.words [0], you should get what you need.

even:

myInsertionPoint.paragraphs [0] will give you the parent paragraph, unless the PointInsertion is the latest in the paragraph. If this is the case, this call returns the next paragraph.

Tags: InDesign

Similar Questions

  • How to import the mp4 in InDesign? Import fails

    How to import the mp4 in InDesign? All I get is the "failed to import" a message @.

    It seems that iMovie did not create a valid MP4 file. If you have InDesign CS6, you should also have installed Adobe Media Encoder in your Applications folder. Open and he re - save in the SOUL, and then re-import. (I have had no problem whatsoever with MP4 files in InDesign, but never export them from iMovie). You can also use another video encoding utility of your choice.

  • How to change the menu after InDesign is run?

    Hello.

    I want to change the menu after the charge of the InDesign menu.

    For example, if the 'Login' success, change the menu as "logout".

    If it is not possible, please tell me how to disable the menu once the menu is loaded.

    Thank you.

    Hi K159,.

    with the UpdateActionStates of your component of the action function, you get an IActionStateList Interface where you can change the name of the menu item.

    Markus

  • How to trash the prefs for InDesign CS6?

    Very, very frustrating.

    Each 'how to' I find online on the way to the trash my ID CS6 Pref told me to replace the files called "InDesign Defaults" and "InDesign SavedDate. The locations of these are supposed to be here:

    InDesign Defaults:

    Macintosh: Disk hard/users / < USER > / Library/Preferences/Adobe InDesign / < Version # > / < language > /.

    InDesign SavedData:

    Macintosh: users/hard disk / < USER > / Library/Caches/Adobe InDesign / < Version # > / < language > /

    Well, there is no "Library" folder in my folder '< USER > '. The folder does not exist "Hiding" anywhere on my hard drive. Nowhere is there not "Adobe InDesign" folder on my hard drive. There seems not to be all the files on my hard drive with the names of "InDesign Defaults" or "InDesign SavedDate".

    What all this possible?

    In the current versions of Mac OS X, these are hidden files. User library files see hidden access | Mac OS 10.7 Lion

  • How to change the javascript for Indesign cs 5 in a version for cc

    Hello

    I have a javascript for Indesign CS5, but I want to use it in Indesign CC, but it won't work

    What should I do, if I can use the script in Indesign CC?

    Kind regards

    EVI

    Why did you change to 10? It must be 5.

  • How to recover the DOM Panel

    I do turn a verasion to the trial of cc2015 and my DOM guard Panel disappear while I'm working or some time after being closed, it is absent when I boot

    A long search in google is not tuen an answer and I can't find a view to turn it on, the only solution I have founs is to reinstall the software

    Please someone HELP!

    Roy...

    Click the window menu item, and then select DOM as in

    To ensure that development remains the workspace as you want, go to the layout of the workplace and save.

  • How to reorder the application bar - Indesign 2015

    I don't know how it happened, but the arrangement of my app bar has changed. When I activate the text tool, my fonts are more to the left, but right-wing. I've always had to the extreme left. Can someone tell me how I can bring it back to the original location on the bar?

    Looks like you've changed in character in point mode Mode. Click the button A on the far left of the control panel.

  • How to adjust the Zoom of InDesign

    I had a problem with In Design that bothers me for some time already, but now that I started working more with the ID want to find a solution.

    When I scroll in Photoshop:

    I increase the size scroll the image in the Center until the edges hit the sovereign that it stats to zoom on the arrow of the mouse on the screen.

    When I scroll in Illustator:

    I do scroll that zooms to the center of the arrow of the mouse.

    When I scroll in InDesign:

    I do I scroll zoom no matter what part of the active side but not the part where my mouse arrow, especial, when I work outdoors (grey area) of the leaf.

    Someone can tell me what I did wrong in InDesign or how/where do I change my settings to make it work the same as the other two the InDesign?

    Version: InDesign CC 2016 on Windows 10

    Another option, select the object or insert text tool, and then hold down Ctrl + Alt and press on + key

  • How to reduce the size of Indesign documents PDF export?

    I wonder if there is a way for Indesign reduce the size of page of a multiple page document?

    I have a 38 page book that has a page size of 9 "x 8"... so the spread size is 9 "x 16".

    I want this in order to reduce the size of the exported PDF file.

    So if there is a way to reduce the size of PDF, that would work too.

    I looked everywhere but could not find a function that allows you to reformat and save this document to a 50 percent reduction, for example.

    Is there such a feature with Indesign on CS1? (or one of the more recent versions CS?)

    Currently the smallest PDF I can export this document is 8 MB. (it contains a lot of graphics)

    I want to get that figure up to 3 MB or more.

    I have the dpi all reduced to 72 dpi... which has helped to reduce the PDF of the original 58 MB.

    But how is it possible to make it even smaller for emailing?

    Thanks for your suggestions.

    And in the process you'll find yourself with a flattened PDF. If you send to a client for proofing, be prepared to explain that these ugly white lines in all directions does not print it. And when they print to a desktop printer and print some lines, you'll have a problem of real credibility on your hands.

    Just a warning.

    Bob

  • How to set the default English indesign when creating text

    How can I configure indesign, when you create a default text for English

    You can set default values by first closing all open documents, and then change what you need in the control panel section, the character Panel, styles to paragraph, character, object, table, color chart, stroke and many more.

    This affects defaults to application , not those already in your document, so new documents will be created with the settings but old documents will remain the same.

    If you must change the default values for an existing document, make sure that nothing is selected and change the settings in one of the panels.

  • How to get the SDK software InDesign CC

    Hello

    I need help in obtaining InDesign CC SDK. On the page http://www.adobe.com/devnet/indesign/sdk.html there is the following text:

    "To request access, please click on the link below and fill out the registration form.  Once this registration form is completed we will evaluate your application and successful candidates then give access to the SDK. The deadline for the approval process is one week. »

    , But after clicking on the link, I get redirected to the site " " https://www.adobeprerelease.com/ ' with the message "No. available programs".

    Is there another way to download InDesign CC SDK?

    Hi Vadim,

    You will probably have a response from someone at Adobe (but I'll still stick my two cents)

    As far as I know, the process to get the SDK you follow is correct, but they just closed all programs pre-release and opens on a new platform.

    It seems that not all of them have been transferred through yet, and the InDesign SDK is one of the tail enders.

    I had access to the SDK program and it seems to be cut being transferred, so I guess everyone is in the same boat.

    (so far as to pay... then again, you are likely an answer from someone @adobe, but I don't think that there is a direct link between being pay a partner and to have access to the program SDK.) However, to take full advantage of the SDK, it is really convenient to be able to track through in the debug version of InDesign. Who was limited access to partners, I think always it is... you might be able to access the program from pre-release InDesign... who knows? You can always ask!

    Best

    Caerwyn

  • How to remove the xml with indesign file attributes.

    Dear friends,

    I need to remove attributes xml ('ul' element), I try to underside of coding and joint screenshot also, but I made a mistake. I'm not that I lack the coding below.

    Screen Shot 2016-02-22 at 12.57.49 PM.png

    My coding in the below.

    var elements = app.activeDocument.xmlElements[0].xmlAttributes.item["@new_class"] = "list-style-type:none";
        alert(elements.length);
        delete elements["@new_class"];
    

    Please suggest friends,

    Thank you in advance,

    Hello

    Try this...

    var doc = app.activeDocument;
    
    removeAttributes(doc,'ul','style','list-style-type:none');
    
    function removeAttributes(source,element,attributename,attributevalue){
        for (var i = 0; i < source.xmlElements.length; i++){
                try{
                    for(j=0; j		   
  • How to view the content in indesign DPS.

    Please

    help someone...?

    (Danish)

    Hello

    DPS 2015 relies on a real application installed on a device in order to get an overview of the content. You will need to:

    -Set up a project in the dashboard DPS 2015

    -Download content and implement collections

    -Generate an app of the overview of the project

    -Download and sign the application (this will produce a signed application)

    -Install the app signed on your device

    That's the short version. Details are available in the documentation provided.

    I hope this helps.

  • How to change the font that indesign uses when no style is applied?

    All of my InDesign (CS4) models are now looking for [time (T1)] in odd places such as the spaces between words in a header, the space after the last period in a paragraph or a cache returns between paragraphs. I tried all the normal suggestions (verification of each character and paragraph including "standard paragraph" style, you select a font in the palette of charater with and without a document open and compensation even indesign preferences and cache files). After all this, I created a new blank document to test if that were to happen in something other than my model files. I'm not creating all styles at this stage, just called a text box and started banging. In the new document, the first line is in the police, I chose, but when I hit return called it at the time. It seems that after the return InDesign switches from the standard paragraph to "no style". Is there a way to change this default font or prevent the empty spaces and between paragraphs to turn to this setting? Thanks for your suggestions. With one file, it is not that big of a deal for find and replace, but when you start working with a book containing many files, it's rather painful to wade through the windows of missing to check what fonts is that and cannot not a real missing font.

    With no document open.

    Go the paragraph Styles Panel

    Clear Overides to standard paragraph

    Change the style

    And change of "next Style apply" to "[same Style]".

  • How to get the name of a page class in the apex oracle

    Hi all

    Can you get it someone please let me know how we can get the class of a page or area name in the oracle apex? I would also like to know how to get the DOM object for particular item ID.

    I appreciate any help on this.


    Concerning
    REDA

    If a category exists already, then you can find them by inspect element in firefox/chrome browser and look like to class = «MyClass...» »

    If there isn't one, then you can add via - point edit > attributes of the HTML Form element > class = "yourclass.

    See this http://www.w3schools.com/tags/att_global_class.asp

Maybe you are looking for