🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #9911

Remove carraige return in JS but keep XML tag styles

#9911
From: Linda_Ni
Date: Wed, 12 Jul 2006 18:25
36 lines
1864 bytes
Hello! I ran into a problem while doing some javascript with XML tags in InDesign CS2. The situation is as follows:

I have a page layout of a business card. Each line of the business card is tagged and has their individual assigned font/spacing/size styles. It will look something like this in InDesign:

===================================
[Jane Doe]
[Assistant
Manager]

[ABC Comapany]
[Tel] (123)456-7890
[Cel] (123)456-7890

[Email] janedoe@abc.com
www.abccompany.com
===================================

The [ ] denotes the tags in InDesign.

What I want to do is: when the line [Cel] (123)456-7890 is deleted, for instance, the section need to move down a line to look like this (carriage return needs to be removed):

===================================
[Jane Doe]
[Assistant
Manager]

[ABC Comapany]
[Tel] (123)456-7890

[Email] janedoe@abc.com
www.abccompany.com
===================================

My current script will remove the carriage return character and move the section down. However, it takes away all the XML tags and all the styles are gone. So I am wondering if there is a way to have JavaScript to control the XML tags so that they don't go away, and only the line that's deleted goes away.

Thank you!!!
Technical Details
Message-ID: <3bc0e443.-1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.musoftware.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,96d7755c6fcded8a,start
X-Google-Attributes: gidf939a,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Linda_Ni@adobeforums.com
Newsgroups: adobe.scripting.indesign
Subject: Remove carraige return in JS but keep XML tag styles
Message-ID: <3bc0e443.-1@webcrossing.la2eafNXanI>
Date: Wed, 12 Jul 2006 11:25:33 -0700
Lines: 45
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.germany.com!news.musoftware.de!news.albasani.net!news.ecp.fr!news.stben.net!webcrossing