[JS] How to break link to paragraph style from script?

I don't found the command break link to paragraph style from script.
I want "unapply" the style from the text, but leave the formatting intact.
Can help me?

In the interface it's a separate command ("Break link to style"), but it seems in a script you have to use
Paragraph.applyParagraphStyle (using:ParagraphStyle[, clearingOverrides:bool=true])
You cannot use "null" or something similar for "ParagraphStyle", so I guess the idea is to use paragraph style #0 in your document (which is always "[No Paragraph Style]"). Be sure to set "clearing Overrides" to false, as it defaults to true.
The following single line works on your current paragraph:
app.activeDocument.selection[0].paragraphs[0].applyParagraphStyle (app.activeDocument.paragraphStyles[0], false);

Similar Messages

  • How do I access *load paragraph styles* from the styles pallet menu?

    Adobe help informs me that I can bring styles from other documents into an existing document by doing this:
    "To copy paragraph styles from one publication to another choose Load Paragraph Styles from the Paragraph Styles panel menu."
    I do not see any menu in the paragraph style menu. I am in CS5. What am I missing?

    I'm sorry, I found it. I had to go back to my G4 and the CS version to see what to do. I did not recognize the small feature on the window yielding the menu.

  • How do you automatically create paragraph styles from a document?

    Hi,
    (posted in general indesign as well - advised to post over here)
    I know I've seen this somewhere but can't for the life of me find it...
    How can I automatically create paragraph and character styles in an InDesign CC document? I'm sure I saw a script to do this and though I'll download that later...only i can't find it now.
    The scenario is that I have a document created by someone else which has lots of paragraph styles, but each one has over-rides on (so they're not really much use). I'm wanting something that will go through the document and create all the different styles that have been used.
    Any ideas?
    Thanks

    Hi
    I was given this tip to try: PerfectPrepText (http://indesignsecrets.com/perfectpreptext-a-smart-way-to-style-local-formatting.php) but couldn't get it to do what i was after unfortunately...however it did point me in the direction of something that does the trick:
    PowerStyles (DTP Tools - Power Styles for Adobe InDesign).
    Not sure if it's available for CC yet though.
    Thanks

  • Trouble Linking TOC Paragraph Styles from a Word 2010 Document to a RoboHelp HTML Project

    I apologize if this question has been answered elsewhere. I did my best to search the forums and the web, but I haven't seen anything that helps resolve the issue I'm having yet. I am new to RoboHelp 9. I am using Word 2010 and Windows 7.
    I am working on creating a WebHelp that is linked to a Word 2010 document. For the most part, I have had no trouble with the linked document, but something seems to be wrong with the styles and formatting for the TOC paragraph styles that I created in the Word document: the formatting does not apply to the topics in RoboHelp. All of the other paragraph styles (Heading 1-4, Body Text, etc.) are working perfectly. The problem seems to apply ony to text using the paragraph styles TOC 1-4.
    The TOC in the Word document looks like this:
    The topic containing that TOC in the RoboHelp project looks like this:
    In the Word document, the entries for 1. Introduction, 2. Punctuation, and 3. Numbers are all all set to the paragraph style TOC 1. The entries for Purpose, Audiance and Applicability, Scope and Other References, etc. are all set to the paragraph style TOC 2. Both of these paragraph styles contain formatting for font and indentations, and they also appear in the RoboHelp project's .CSS file as WD_TOC 1 and WD_TOC 2.
    The problem, as far as I can tell, is that the TOC 1, TOC 2, and TOC 3 styles do not appear to be applied to the text in the topic.
    I could resolve the issue by highlighting the text I'd like to apply the style to and applying the appropriate style using the Styles and Formatting pod, but then every time I update the Word document, the text would revert.
    Does anyone have any suggestions?
    Please let me know if anything is unclear or if I need to provide additional information.
    Thank you!
    Rachel

    Thanks for your response, Peter. I do understand that what I'm trying to do is not standard--and probably not best practice for WebHelp. I am following instructions to make the WebHelp function like the website we are using as a model, which  features a TOC for each chapter as a separate page. So I understand that what I'm doing is essentially pounding a square peg into a round hole, but it seems like it should work as long as RoboHelp can pick up the right paragraph styles.
    I can eliminate the page numbers pretty easily by choosing to use hyperlinks instead of page numbers in web output (this is an option in Word 2010), but the Hyperlink style is a character style that overlays the paragraph styles TOC 1, TOC 2, etc and suppresses page numbers. While the Hyperlink character style translates with no problem to RoboHelp, those underlying paragraph styles are still not linking up quite right. For the sake of trying to simplify things and address the real problem, I temporarily removed the hyperlinks (thereby including the page numbers) in order to straighten things out. Thank you for pointing out the apparent oversight, though!
    What's confusing about the problem is that WD_TOC 1 and WD_TOC 2 are already defined--they just aren't being applied. I can apply them manually, but as soon as I do, the status indicator in the Project Manager pod changes to the yellow triangle with an exclamation point (), indicating that the project is out of sync. As soon as I update the topics, those TOCs revert to having no paragraph styles at all. Does that make sense?
    Thanks again for your help!

  • How do I use multiple paragraph styles in one line?

    I'm working on my thesis in APA style.  I'm creating a Table of Contents with the help of Pages.  When you get to Level 3 in APA headings (no problems with Levels 1 and 2) it needs to look like this:
    [0.5in Indent] Masculinities in higher education.  For men, the college experience.... (paragraph starts on same line as the heading).
    I created a paragraph style for the (bolded) heading above [Heading 3].  When I do this, like magic the heading shows up in the table of contents (yeah!).  However when I do this the rest of the paragraph shows up too (boo!).  When I highlight to change the just rest of the paragraph (not the heading) to the style "Body" it changes the heading too and removes it from the table of contents.  How can I make 2 paragraph styles work together in the same paragraph so I can use the tale of contents tool??  Surly there is a work-around.
    Pages 5

    As the name implies, paragraph styles are not intended to be used on a unit smaller than a paragraph. Therefore if you want the TOC to be automatically generated then you need to have distinct  paragraphs... as you specify the APA style with the content and heading continuous then you will have to manually create the TOC.

  • How to export RTF with paragraph style names?

    Anybody can help me "how to export RTF with paragraph style names?"
    Thank you

    It's not something that's natively done with Indesign.
    However it's possible that it might be able to be scripted.
    Check the scripting forum
    http://forums.adobe.com/community/indesign/indesign_scripting

  • Change any paragraph style by script

    Hi !!!
    Is it possible change a selected paragraph with any paragraph style by script?
    Example:
    My paragraph style is:
    Font: Garamond, size 7pt, color: black, align justfy (or any selected paragraph style)
    Script to set the selected paragraph with paragraph style describe above to:
    Font: Humanist, sise 8pt, color: black, align justfy
    Drop caps: number of lines: 3, one or more caracteres: 2

    I got it.
    But there is a trouble.
    How can I change into this script the first caracter dropcaps to fill tint 30% Black?
    var myPara = app.selection[0].paragraphs[0];
    var myChar = myPara.characters[0];
    myPara.dropCapCharacters = 1;
    myPara.dropCapLines = 2;
    myPara.dropcapDetail = 1;
    myPara.firstLineIndent = 0;

  • Break link to Character Style with JS (CS4ME)

    Hi,
    I'm wondering how to break a link to a character style in JS. By break
    link I mean removing the character style but preserving the formatting.
    Given a selected textStyleRange, say, in the UI there are two ways of
    doing this. One is to click "Break link to Style" in the flyout meny of
    the character style palette.
    The other is to right-click and select "Apply character style."
    It's a little unintuitive, because CLICKING on removes overrides,
    but right-clicking and selecting the menu option doesn't.
    So when I saw that, I said to myself aha! Probably:
    myText.appliedCharacterStyle = myCharStyle
    is equivalent to clicking on , while
    myText.applyCharacterStyle(myCharStyle)
    is equivalent to right-clicking on and choosing "Apply character
    style."
    But it isn't.
    They both apply None and remove all formatting.
    So, anyone know how to break a link to character style without removing
    formatting in JS?
    Thanks,
    Ariel

    Thanks Peter. That's interesting. After Shabbos I'll have to try figure
    out how to apply a character style without removing overrides as well.
    It may be a two-step procedure.
    Thanks,
    Ariel

  • How do I prevent unwanted paragraph style overrides when exporting an epub

    I am having trouble controlling the size of a  logo in an e-pub. Actually, it's only a problem with Amazon's Kindle which seems to insist on enlarging the image to the full screen width. So, I need a robust command in my CSS to override Kindle's preference. Seems easy. I placed the logo into my In Design layout in a picture box with the object style "frontmatterlogo" which should export into a div of the same name. Which it does. So far so good. However, In Design insists on creating a paragraph style override (see bold in the code below) which disregards the  frontmatterlogo settings I've written in to my CSS in favour of it's own image settings which correspond to the size of the placed image. Currently, I've just put together a hacked solution by writing a class for para-style-override into my CSS. It's an inelegant solution but seems to work for all the other e-readers. But, as mentioned, it doesn't work on the Kindle.
    Anyone have any idea what is causing these overrides and how I might prevent them so my div class can take over?
    Alan
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 //EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <title>Titlepage2-1.html</title>
            <link href="template.css" rel="stylesheet" type="text/css"/>
        </head>
        <body>
            <div id="Titlepage2-1.html" xml:lang="en-US">
                <div class="story">
                    <p class="Pagebreak"/>
                    <h1 class="fulltitle">Far North</h1>
                    <h2 class="author">MARCEL THEROUX</h2>
                </div>
                <div class="frontmatterlogo">
                    <p class="para-style-override-1">
                        <img width="191" height="19" src="images/HarperPerennialClassic_fmt.jpeg" alt="HarperPerennialClassicsLogo.jpg"/>
                    </p>
                </div>
            </div>
        </body>
    </html>

    Thanks for getting back so quickly, Bob.
    I'm using Version 5.5. I have basically the same problem when the object is anchored. In the case below, I created a new paragraph style for the line on which the logo would be anchored, also mapping to the frontmatterlogo entry in my CSS. This time, no paragraph-style-override is added but In Design still adds it's own image dimensions corresponding to the size at which the image was placed in the layout. This overrides the settings in my CSS and, I suspect, might be what's allowing the Kindle settings to take over as well. I had kind of resigned myself to fixing this in the code  on a book by book basis, which is fine if the only images the book contains is a cover and a title page logo. But I'm worried about what happens when I have to create an e-pub from a photo-heavy book. You can see how it would be ideal to create a few specific object styles for different image situations in In Design and have them map them to specific div styles in my CSS. Basically it's a workflow issue. This would minimize the amount of after-the-fact coding our already swamped designers would have to do.
    It's so obvious in the code where the problem lies, and so I just have a feeling that there may be a simple fix. If only I knew why In Design felt obliged to specify the image size.
    A.
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 //EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
        <head>
            <title>Titlepage2-1.html</title>
            <link href="template.css" rel="stylesheet" type="text/css"/>
        </head>
        <body>
            <div id="Titlepage2-1.html" xml:lang="en-US">
                <div class="story">
                    <p class="Pagebreak"/>
                    <h1 class="fulltitle">Far North</h1>
                    <h2 class="author">MARCEL THEROUX</h2>
                    <p class="frontmatterlogo"><img class="frontmatterlogo" width="196" height="20" src="images/HarperPerennialClassic_fmt.jpeg" alt="HarperPerennialClassicsLogo.jpg"/></p>
                </div>
            </div>
        </body>
    </html>

  • How do I show table paragraph styles in keynote 6.1 (mac)?

    Hi community,
    I am tryying to apply changes to paragraph styles in keynote 6.1 (mac). But in the list which opens when i click in the triangle only the basis paragraph styles are seen.
    Any ideas how and whre i can find theses styles.
    Thanks
    slyrs

    I am sorry that I cannot make myself clear - perhaps because of my language competence
    1) There is a table style (for the whole table)
    And there are PARAGRAPH-styles for the text-attributes of the text in the table-cells (bold, italic, size, font etc.). I would call this a paragraph-style. This can be seen here:
    But this style cannot be edited or changed because it does not show up in the dropdown of the parapgrah-styles - as can be seen here:
    You DO NOT FIND the paragraph-style ("Absatzstil" in German) "Tabellenstil 1" in the dropdown.

  • Attaching page break to a paragraph style. Can I?

    I know that we can set a paragraph to start on the next, left or right page, but is it possible to make a paragraph style that makes that para. the last one on the page? So I want the page break function attached to a style.
    thanks
    jon

    [Jongware] wrote:
    Did you try Scott's advice: set the Space After of that last paragraph to 20 inch?
    When I tried this, it seemed to work, but I decided against suggesting it because I was also playing with some other settings that affected subsequent paragraphs, and I wasn't sure if the combination was making it appear to work. Growing up in FrameMaker, I learned that space before a paragraph is ignored at top of frame/column/page, and space after a paragraph is ignored at bottom of frame/column/page.
    Well, lah de dah, InDesign honors space after a paragraph. Bingo. Simplest.
    However, I'm curious why it's important to mark the end of one contributor's work this way, rather than marking the start of another contributor's work by applying the start at top of frame/column/page property. Unless the first new contribution paragraph is moved to another position in the sequence, first is always first; Next Style assures that pressing Return at the end of the first paragraph when authoring, or selecting multiple paragraphs and applying the top-of-container style to the first paragraph and letting the Next Style option handle the rest of the selection.
    When the last paragraph moves forward in the text flow, or a paragraph is added after it, the new contributor's first paragraph at the top of the next container is not affected; if sufficient content is added or removed upstream to reflow the later contributors' work top-of-container always works as expected.
    Is there some compelling reason not to mark the author change by the first-paragraph-at-top method?
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Niceties of apply the [None] character style and its relation to Break link to Character Style (CS4 upwards)

    Hi,
    Am I the last to realise that, with text selected, clicking on is
    different from right-clicking on and selecting "Apply " in
    the character palette?
    Let me explain: Say you have some text selected. The text has a
    character style applied called "Superscript", whose only attribute is to
    apply superscript.
    Now, with that text selected, if you click on the result is that
    is applied and all formatting is lost.
    But, if you right-click on and choose "Apply " from the
    context menu, is applied but formatting is NOT list. Effectively
    this is the equivalent of choosing "Break link to style" in the flyout
    menu of the character palette.
    Curious to know if you've come across that that distinction before?
    Thanks,
    Ariel

    Sorry Peter. On behalf of the stupid Jive forums, I do apologize. Everywhere in my post where I wrote [None], it was jived up a little and changed to a link. (I've only got Internet access during breaks -- a self-imposed firewall that allows me to actually get some work done.)
    The post shoudl have read:
    Hi,
    Am I the last to realise that, with text selected, clicking on [None] is different from right-clicking on [None] and selecting "Apply [None]" in the character palette?
    Let me explain: Say you have some text selected. The text has a character style applied called "Superscript", whose only attribute is to apply superscript.
    Now, with that text selected, if you click on [None] the result is that [None] is applied and all formatting is lost.
    But, if you right-click on [None] and choose "Apply [None]" from the context menu, [None] is applied but formatting is NOT list. Effectively this is the equivalent of choosing "Break link to style" in the flyout menu of the character palette.
    Curious to know if you've come across that that distinction before?
    Thanks,
    Ariel

  • Nesting "No Breaks" in a paragraph style?

    (Apologies if this has been asked and answered.)
    Is it possible to define my body copy paragraph style to automatically apply "no breaks" to the final two words in the paragraph?
    I'm pretty good about scanning through the text looking for paragraphs ending with one little word hanging off the end, but it'd be nice to automate it.
    An alternative would be to define a minimum word count allowed on a single line. (Not useful for subheads!)
    Thanks.

    Aha!
    That's true that ...
    ... equals 2 words!
    No other comment!  but you can take a look to this interesting post: http://forums.adobe.com/message/2280546#2280546

  • How do I change the default paragraph style from Body Text?

    The default paragraph style in my email setup is Body Text. This does not wrap properly for some recipients, but Paragraph does. How do I change the default so that Paragraph is automatically used when I start a new email?

    There are two types of defaults: defaults for all new documents and defaults for the current document. To change the default for any open document make sure no text frame is active and change the formatting as desired in either the Control panel or the Character and Paragraph panels. To change default formatting for new document (those not yet created) do this while no file is open. You can’t change the defaults for several documents at once without a script.

  • How can i give multiple paragraph styles on the same line

    i want to give different paragraph style in the same line in an indesign document. bt when i tried it, it is coming in two different line.
    actually i am doing a project in which Frame maker document is transformed into indesign document. in frame maker this is possiable, but in indesign i cannot give different paragraph style in the same line of the document.
    Is there any way to do this ????

    YaneshTyagi wrote:
    i want to give different paragraph style in the same line in an indesign document. bt when i tried it, it is coming in two different line.
    actually i am doing a project in which Frame maker document is transformed into indesign document. in frame maker this is possiable, but in indesign i cannot give different paragraph style in the same line of the document.
    Is there any way to do this ????
    Hi, Yanesh:
    Please understand, the FrameMaker feature known as a run-in paragraph, which is a paragraph with a "carriage return" but without a "line feed," HAS NO COUNTERPART in InDesign. InDesign also lacks the FrameMaker side heading feature, which is created by the combination of a reserved area in the text frame and the paragraph property to inhabit that area. FrameMaker separates paragraphs by using the larger of space below paragraph and space above paragraph, but InDesign separates paragraphs by adding the space below paragraph and the space above paragraph.
    There are several complicated manual methods of simulating these FrameMaker properties in InDesign.
    Here's a recent forum discussion of these exact issues: http://forums.adobe.com/message/3759635#3759635. The thread mentions DTP Tools' conversion tool, the MIF Filter commercial plug-in for InDesign, and discusses its shortcomings. I don't recall it mentioning in-tools.com plug-ins that can simulate side headings, like those in FrameMaker, but they don't convert FrameMaker to InDesign. 
    You can add your vote for InDesign's developers to include these FrameMaker features, and any others you'd like to see, here: wish.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

Maybe you are looking for

  • Resetting a JLabel with setIcon

    i have a JPanel and a JLabel in it.. the program creates a chart and a jpeg image of a chart in a particular location. i want to load the jpeg image (i create an image icon of the jpeg chart) and on the click of a button i do a JLabel.setIcon(imageIc

  • Master Encoder - Slave Axis Gearing (beginner's question)

    Hello In the documentation of this vi there is a sentance: "Note: The use of the term "rotations" here assumes that the encoders being used have the same number of counts per revolution." And what about situation when encoder 'A' (master) has 'X' enc

  • URGENT !!! Export help

    I'm using Enterprise manager to export a table. It wnat a node preferred credential! I have tried all the user ids(sys, system,databse id)and nothing works. What is it looking for and where do I find it. I am desperate.....

  • Urgent -  Workflow (WF14000133)

    Hello We use SRM Server5.5(Classic scenario) We implemented BBP_WFL_APPROV_BADI for WF14000133 But agent is not assgined. When i check the workflow log using swi1, there is no agent. System show the message " all users can process this task", when i

  • When I start my macbook  a flashing file folder with a ? mark appears in the middle of my screen.

    When I start my mac book a flashing file folder with a question mark in the middle appears in the middle of my screen.