Delete tagged text carriage return
Hello
I'm trying to score a few points, but I have some difficulty. I would like to mark all paragraphs of a textframe.
I do it like this and works like its supposed to:
var paragraphs:Array = indesignTools.getParagraphsForTextFrame(currentTextframe.id); for (var j:uint = 0 ; j < paragraphs.length ; j++) { var currentParargraph:Paragraph = paragraphs[j]; if (currentParargraph.isValid) { InDesign.app.activeDocument.xmlElements.add("section", currentParagraph); } }
Now, the problem I have is that, if the paragraph has a cart at the end, this carriage return should not get tag,
so I should finish with a paragraph labeled, NOT to mention the last return transport.
How do I change my code if I can mark all paragraphs without the last carriage return?
Still waiting for a few comments of thanks or a useful on the post on the recovery of the properties of a "nil" style of characters but anyway...
Why not just replace
var currentParargraph:Paragraph = paragraphs[j];
with something like
var currentParargraph:Paragraph = paragraphs[j].characters.itemByRange(0,-2)
It does not test, but should work.
Don't forget to tell your little.
Trevor
Tags: InDesign
Similar Questions
-
Carriage return / new line / br do not work when inserting text.
Hey there!
I have this inside a loop and pull strings in a table
myDefs += unescape (across [i] [0]);
myDefs += "\r";
It works perfectly (watch returns the text with the transport)
Alert (myDefs);
This does not at all (see the text all together)
SYM.$('across_txt'). Text (myDefs);
Any clue? I tried with .html (myDefs); also and it does not work.
Thank you. Adrian.
Adrian-
Please keep in mind that what is happening in the tag html() is real HTML, which means that your carriage return means nothing. Try casting your text in
tags or insert a
tag instead.Hope that helps!
-Elaine
-
Exported text and carriage return
Hello
After you export a history selected with a JavaScript in an external text file, there is always a carriage return too the end of the file exported.
How can I get rid of this CR?
Thank you!
I * think * "e" mode is messing things here, i.e., you * are * changing the string, but rewriting it replaces the original text less transport returns to the end, and because you stop to write here, the original file data remains. Don't know if it's like 'e' is supposed to work, but then again, remove from the equation makes things work.
(It actually also needed a ' file.seek (0) ' at work.)
It is a slightly better way: open for read only, read, close; Remove carriage returns (line feeds as well, and sometimes I work on Windows here); open for writing and recording.
For safety, I replaced the blind slaughter of the 'last character' with one; any number of returns at the end is deleted, or none if there is none in a first time.
function delCR(file) { var myFile = file.open("r") ; var myCont = file.read(); file.close(); var myShortCont = myCont; while (myShortCont.substr(myShortCont.length-1) == '\r' || myShortCont.substr(myShortCont.length-1) == '\n') myShortCont = myShortCont.substr(0, myShortCont.length - 1); myFile = file.open("w") ; file.write(myShortCont); file.close(); }
-
Hi all
I have a requirement to replace the < < br > > tag in the text field with a carriage return character.
".
Currently, the data in the comments field looks like:
"SECURITY 20100627-115541 SE RESTRAINT to HAND ENTERANCE" < < < br > > "advised 20100627-115605 agent: ALPHA: DF-10-011891;" ST VINCENTS HOSPITAL, ST. VINCENT, ST. VINCENTS HOSP., MERRION RD, MERRION, BOOTERSTOWN, DUBLIN; "" ACTIVATION OF the ALARM - FIRE /;' < < br > > ' 20100627 - 115609 PDA MOBILIZED AFTER AMENDMENT wine1 "< < br > > ' 20100627-
The < < br > > break tag has been used to end HTML, and now I would like to replace it with a return to report BI Publisher character.
Appreciate3 your help.
Concerning
B
Published by: bees on July 21, 2010 04:36Check out the http://blogs.oracle.com/xmlpublisher/2007/01/02/ blog
Download the zip file and search for the associated XSL file replacement BR -
delete the text that is inside xml tags
Hello
I want to delete the text that is in the xml tags
IE SELECT ' < XXX > Pune < / XXX > < HD ZZZ > < / ZZZ > ' FROM DUAL must return PuneMH
Thank you
VIvek
Published by: Vivek P on October 7, 2008 08:35SQL> SQL> -- SQL> with t as ( 2 select '
Pune MH ' as x from dual) 3 -- 4 select x, 5 regexp_replace(x,'<.*?>') as modx 6 from t; X MODX ---------------------------- ----------Pune MH PuneMH SQL> SQL>isotope
-
Before this version of Firefox 36.0.1, the < textarea > HTML worked in my forms. View Cart returns. In the version of 36.0.1 that they no longer work correctly. However, when I enter a carriage return, it displays a space instead of a line break. I went to test basic textarea
< textarea > name = cols 'comments' = 20 rows = 10 < / textarea >
to make sure that I was not introducing anything with other languages.
I use Windows Pro 8.1. I drove back to 35.0 Firefox and everything works fine. I installed 36.0.1 and it stops working.
I have access to another laptop also running the same version of windows and Firefox and it seems to be done as well strange things. I'm suspicious because I started to notice this immediately after a windows update last night. The laptop also known issues that he immediately after a windows update last night.
I still have another computer running a different version of windows and Firefox and it works very well. It seems that the issue is where there are windows Pro 8.1 and Firefox 36.0.1.
Guys do you have an idea what is happening here?
Thank you
JMRAUPE57The current version supports the white-space for a text box property and it is possible that the Web site uses spaces: pre instead of spaces: pre wrap.
The former will prevent Firefox of text wrapping.You can check that out in the Inspector via the context menu.
See:
The white-space property is currently working on HTML < textarea > (bug 82711) elements.
See also:
- [1050456/questions/1050456] Problems of film to 36.0
-
Remove the carriage returns in the text in an oracle SQL table column
Hello
Someone knows how to remove carriage returns in a text column in an Oracle table
using SQL. So far, I have:
Replace (text_field, Chr (13),' ')
but this is ignored.
(We use db 10g (enterprise Edition Release 10.2.0.4.0) and SQL * more 10.2.0.1.0)
I would be very grateful for any help.
-MarkHow does the following:
UPDATE table_name SET col_name = REPLACE (col_name, Chr (13), ");
But if your new line is CR + LF, then use REPLACE (col_name, Chr (13) + Chr (10), ")
-
Importing of XML in Indesign text friendly "carriage returns.
Hello
I have a question regarding the import of XML in Indesign. I have my text stored in Excel (Fig A) and intend to export to an XML file, where each line will represent each page. However, my first attempt failed process "cart returns" I had considered:
"Carriage returns" used within a cell in Excel (ALT + ENTER) are preserved during the transformation to a CSV (fig. B). However, when converting a file XML, the conversion takes place on a line-by-line, and therefore, the XML file becomes incomplete (Fig C).So it seems, I need to make sure that the CSV file contains one line per entry, while maintaining the real transport returns in my spreadsheet source and for Indesign to recognize. To do this, I'll need to substitute "carriage returns" in my excel column to be represented by a new set of characters. My question is how can I let Indesign can recognize this set of characters to be converted to a carriage return, importing text.
For example, if the character set has been ' %% ', then my new csv file would look like Figure D and XML would be produced correctly, as the Figure E. Then import this XML file into InDesign, return transport would be automatically restored, if all goes well.I hope someone can help me because I am only starting in Indesign and feel Im running until I can walk by embarking on the XML/Indesign arena too early.
Best regards
LukeNo, I don't think.
The fact is that ^ is a special character to find/replace.
so you should either avoid its use in search strings to avoid confusion.
or if you agree the confusion, you must use ^ ^ n to search for
(instead of ^ n).
-
(AS) Select the text of the paragraph without bringing out the carriage return
(AS) Select the text of the paragraph without bringing out the carriage return character.
I need help to select a paragraph in a story.
The selection does not contain a 'return' (ASCII number 13 ")My current sample is as follows:
-example assumes that the insertion point is already placed in a specific paragraph.Tell application "Adobe InDesign CS3"
activate
theDoc Set to the active document
say theDoc
Select the paragraph 1 of the selection
end tell--theDoc
end tell--appSounds simple... The example above to select my paragraph selected.
but he also chose the carriage return also. How would I go to do this?
Any advice would be helpful!
Thank you!
Try:
Select text in character-2 of paragraph 1 of the selection of character 1
-
Different handling - FM11 to FM2015 carriage return
Hello
There is a change in FM11 to FM2015 with import XML on the carriage returns. I was wondering if someone could explain it. I don't know if it is related to the other FM2015 spaces talks to date.
Here is my XML file with zero whitespace (carriage returns), open with default application and no validation:
<?xml version="1.0" encoding="UTF-8"?><test> <p>TEST</p> <p>TEST</p><p>TEST</p> </test>
In FM11, it opens as I expect:
In FM2015, I get a paragraph with a unique space where the carriage return is:
This will not occur when I use a structure with normal posting app. Can someone explain what has changed?
Thank you
Russ
Russ,
I opened your test file in 2015 FM with the default setting (enabled) for RemoveExtraWhiteSpacesOnXMLImport, and with it set to Off. Behavior that I got was slightly different that you mentioned, but I think it's okay.
When enabled, the document window displays 3 FGP. the Structure view shows a
with 3 s.
When the option is disabled, the document window not display 4 FGP you reported, but 6. Three of them contain a
element with the text "TEST"; the others are ranges of text in the
element, each containing a single space. All these beaches text correspond to the line breaks in the input document: after the start of tag, after the end tag for the first and after the end of the last tag
.
The XML recommendation requires that all white space is significant. As a result, FM is correct not get rid. Convert the spaces line breaks is consistent with the treatment of FM of line breaks in a paragraph.
When you open the same file using a DTD which does not allow for text ranges between
elements, FM does not create the text ranges.
While surprising at first, I think that the behavior is correct. So I don't mind test in FM 11 or 12 FM.
The problem is that if you want a white space after xrefs treated properly, you must disable the option and if you want to avoid breaks come as data characters, you should enable the option of line. The solutions are:
(1) use a DTD
(2) to preprocess the entry to remove XML format line breaks
(3) to preprocess the entry to change a space after an xref to a character reference
(4) Hope Adobe fixes the bug soon
-Lynne
-
CFFILE READ xml file removes the carriage returns
When I use CFFILE to READ a XML file (in order to get to the XMLPARSE step), it deletes all the outside between the carriage returns.
My simple order of action CFFILE = 'read' file variable = "" #tempFile # "="XMLData"results, of course, in the XMLDATA variable." When I've got CFOUTPUT this value, all the transport returns have disappeared.
In the original raw XML file, there is a section as such:
< inspection_comment comment_type = '0' > missing tag.
Channelled to the rear. d < / inspection_comment >
In other words, there are in fact two combinations of chr (13) chr (10). Yet, after the CFFILE READING, I find myself with
Missing tag. Channelled to the rear. (d)
and no carriage returns whatsoever. It is a natural phenomenon, because it is an XML file, or I just don't hold my tongue right?
Thank you! RLS
Carriage returns are not visible in html. Make sure that you use
balises ou quelque chose de similaire.
-
Carriage returns in Textarea field in the mail of the APEX
Hi all
I have a form that users fill out and when he clicks on submit uses APEX Mail to send the content to individuals in an HTML format. A field is a text box where the individual enters information like the example below:
When the message is received, instead of on a single line, each entry follows another as:First to Arrive: Bob Second to Arrive: Jane Third to Arrive: Sandy Last to Arrive: Fred
First to arrive: Bob second to arrive: third arrived Jane: Sandy last to arrive: Fred
I posted to get the fields of the form to show carriage returns and that works very well. Now, trying to figure what to add in order to make sure that this line breaks are like html br tags broken handles. Any help and examples would be appreciated.
Thank you
Wally
Published by: wfsteadman on February 17, 2011 16:49Use HTML elementpre in HTML mail to keep a space for formatting.
-
ignoreWhite Strip carriage returns?
I read in the many resources to ignoreWhite get rid of all the carriage returns. Yet, when I run this simple example, I see a car visible return (2 actually) in the output panel. What happens here?
XML:
<? XML version = "1.0" encoding = "UTF-8"? >
< portfolio >
< section sectionName = "signature" >
< filename = "contents filename.swf' caption = 'Hello' >"
This is the text that goes in here.
< / content >
< / section >
< / portfolio >
ActionScript:
var myXML:XML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function (success: Boolean): Void {}
If (success) {}
trace (this);
}
else {}
trace ("error loading XML file");
}
};
myXML.load ("portfolio.xml");
Here is a screenshot of the output panel:
http://www.thinkseed.com/test/ignoreWhite_output.gifTwo things seem to solve this problem:
Adding a CDATA tag in the XML file:
Or just get rid of the carriage returns:
This is the text that goes in here.
-
I accidentally deleted my text messages, how to bring them back?
I am new to iPhone, I was wanting to delete a text message, I had it checked marked on the text, and it deleted all my text messages! is it possible to receive in return?
I tried Icloud.com did nothing
I tried iTunes, I don't think that it has nothing either
are there any other suggestions for the recovered old text messages?
Thank you
restore the last backup when the sms was always there or try asking the carrier if they can do something
-
Indicator automatic resizing of string with carriage returns in the chain
I try to have a string on my front indicator automatically resize to put different strings that are sent to it.
I found the function 'Get the Rect.vi text' and it seems to do exactly what I want, but only for the first line of my string.
It is not resized to display characters after a carriage return / newline.
Here is a picture of the chain resized automatically next to a picture of the complete string that I size manually.
How do I autosize my chain indicator box to include all of my text?
The node to invoke "Text size" would work?
Maybe you are looking for
-
I registered by Instant ink error. Please can you tell me how I can remove?
I've just set up my printer inkjet HP 3634. Please can you tell me how Opt Out of instant Ink, because I didn't www.voyages-sncf.com this?. Thank you
-
(1) downloaded the evaluation version Microsoft Windows Small Business Server (SBS) 2011 Essentials to my laptop (Windows 7, IE 9) but now I can not understand how to open it (2) in addition, I want to assure you that I understand how the server work
-
original title: security Whenever I connect to my hotmail account using Windows Live, I get a warning, "there is a problem with this Web site's secure certificate. » Security certificate problems may indicate an attempt to fool you or intercept any d
-
vwindows vista RECOVERY DISK _PAVILION DV6000 problem
Hello My Hp languages a few upgrades and disabled. Since then, I can't start system at all (vista). I have no windows installation disk or recovery disk. Thanks for the tips Waldemar
-
Respond to touch simultaneously
Hello world I have 3 HSlider in my Flex app, and I would like the user to be able to drag them all together (simultaneously). The problem now is that when the user is dragging a HSlider, the application does not meet the second touch on the other HSl