How to put a new line in the text block using jsx?

Hello guys,.

I am concatenating the content of the text block using two JSX, but I want separator as a new line. I have tried \n but does not work please help how to do that.

var  seperator = "\n" 
frame1.textItem.contents + seperator + text;

Hi UpendraSengarr,

Try this:

var frame1 = app.activeDocument.activeLayer;
var  seperator = "\r";
frame1.textItem.contents = frame1.textItem.contents + seperator + "text";

Have fun

Tags: Photoshop

Similar Questions

  • How to put (Link) certain data of the text block and layer 1 layer 2

    Hi guys...

    I have a block of text that contains 5 element xml, these items showing in the xml of my InDesign file structure,

    above the text, structure is in layer 1.

    I want to put (Link) a given in layer 2 xml element and xml structure shouldn't be change.

    This is the code...

    var doc = app.activeDocument;

    var OnlineLayer = doc.layers.add ({name: 'online'});

    var monnoeud = doc.xmlElements [0].xmlElements [2];

    I want to link myNode element with layer named 'Online'

    Is it Possible, if possible please tell me...

    Thank you...

    Hi guys,.

    It does not work correctly...

    var doc = app.activeDocument;

    var OnlineLayer = doc.layers.add ({name: 'online'});

    var monnoeud = doc.xmlElements [0] .xmlElements [2];

    myFrame var = doc.pages [1].textFrames.add (OnlineLayer);

    myFrame.geometricBounds = [3, 3, 13, -20];

    myNode.placeXML (myFrame);

    myFrame.fit (FitOptions.FRAME_TO_CONTENT);

  • anchor in the property tags htmltext of a TextField causes of new lines in the text?

    Hi all

    I have a few HTML loaded from an XML document which includes web links (anchor tags).  I use a TextField to display the text and am connect the XML data in the htmlText of a TextField property and renders the text with HTML tags, links work etc.

    The problem I see, is that a new line is created before and after the link, so html like this:

    Hello World < a href = "#" > This is a < /a > link and all this must be on the same line.

    is made like this (with particular attention to the new lines):

    Hello world

    This is a link

    and all this must be on the same line.

    Does anyone know how to avoid these new lines appear when using HTML links in a TextField?  Any help is greatly appreciated.

    Your HTML tags are being analysed in XML format, and new formatting applied. To avoid this, place a CDATA tag around your HTML code. Previously your XML could be something like this:

    
         hello world this is a link
    
    

    Change this to look more like this:

    
         this is a link]]>
    
    
  • How to write to several lines in the text element?

    I tried to write 2 lines in the text element, however only return one row:

    : myqueues.queue: = "Hello" | Chr (10) | ' world ';

    It gives me only 'Hello' in the first line and nothing else in the 2nd line.
    Are there settings needs to be activated in the property of text element?

    Try this:

    DECLARE
    v_filename VARCHAR(50);
    v_handle text_io.file_type;
    
    begin
    v_filename := get_file_name(file_filter=>'All files(*.*)|*.txt|');
    if
      v_filename is null
    then
      bell;
      return;
    end if;
    
    v_handle := text_io.fopen(v_filename, 'r');
    
    go_block ( 'myqueues' );
    clear_block;
    
    text_io.get_line(v_handle, :myqueues.queue );
    next_record;
    
    text_io.get_line(v_handle, :myqueues.queue );
    next_record;
    
    text_io.get_line(v_handle, :myqueues.queue );
    next_record;
    
    text_io.get_line(v_handle, :myqueues.queue );
    
    first_record;
    
    text_io.fclose(v_handle);
    
    exception when no_data_found then text_io.fclose(v_handle);
    
    end;
    

    Published by: Magoo on 02.10.2009 12:01

  • How to add a new line in the JavaScript editor?

    I have a script like this:

    var n = this.getField("score").value;

    If (n > = 0 & & n < 5) {}

    Event.Value = "The WP 100% Bond\nThe 10% Stock WP / 90% Bond\nThe WP 20% Stock / 80% Bond."

    }

    I want out of this line as...

    The leap from 100% WP

    The Stock of 10% WP or the Bond of 90%

    The Stock of 20% of WP or 80%

    But it's not to honor the \n for a newline. How in the heck can you add a new line? I tried \r, \r\n, \n\n. It is to add a space character and looks like this...

    The leap from 100% WP WP 10% Stock or the Bond of 90% 20% of WP Stock or Bond of 80%

    You can use \n like you did to indicate a new row or \r (carriage return). If this does not work, be sure to set the Multiline field on the Options tab of the field properties dialog box.

  • How to add a new line at the top of manual tabular form

    I have a manual tabular form. I am trying to add a line at the top of the form, instead of the new line of being displayed at the bottom. any ideas are appreciated.

    Thank you
    Surya

    If you did a manual tabular presentation using a select statement as follows:
    Choose option...


    Union of all the
    Select... of double

    Try to simply reverse the two select:
    Select... of double
    Union of all the
    Choose option...

    I did this in an application, and it works.
    (I've never tried with sorting...)
    Concerning
    Stefano Corradi

  • How to create a new LINE

    Hello

    How to create a new line in the view object to programmatically support (without using the create operation).
    give some ideas

    Kind regards
    Rami

    That help you

    ViewObject vo = findViewObject("YourViewObject");
    ViewObjectImpl viewObject = (ViewObjectImpl)vo;
    Row newRow = viewObject.createRow();
    // set your attribute for the new created row
    
    //...................
    viewObject.insertRow(newRow);
    
  • Referring to the line in the text field

    Hi, this is probably very simple, but I couldn't find anything in the net.

    How can I take specific line of the text field. In my case, it will be number and I am planing to use parseInt. on this channel

    example:

    LINE1 = 001

    Line2 = 002

    line 3 = 003

    ....

    I'm in position to take this "002" line2 in

    Something like the following might work if the text is in a list with the new lines for each line... "tf" is the name of the instance of the TextField...

    var stringArray:Array = String(tf.text).split("\r");
    trace(stringArray[1]);

  • How to open a new tab from the address line?

    How to open a new tab from the address line?

    You will need to hold down the ALT key and press ENTER to open the link in a new tab without the use of an extension cord.
    By default the links always open in the same tab.

    You can search the Addons site for an extension if you want to change this default behavior.

  • How to put windows 7 pro on the new computer using the same key on the side of the other computer

    I have a computer comes with windows 7 pro. I am now building a new computer. How to put windows 7 pro on the new computer using the same key on the side of the computer. I don't have a Windows 7 disc.

    Original title: Windows 7 pro

    Tuesday, October 14, 2014 20:31:20 + 0000, 4hammond wrote:

    I have a computer comes with windows 7 pro. I am now building a new computer. How to put windows 7 pro on the new computer using the same key on the side of the computer. I don't have a Windows 7 disc.

    You can not, for at least one (and two possible) reasons.

    1. it isn't clean if you want to have two computers, or you
    you want to remove from the old computer and put it on the new. If
    you want once, you can't do that - the rule is very clear: there
    a copy (or a license) for each computer.

    There is nothing new here. This is exactly the same rule that has been in
    effect on all versions of Windows from at least with Windows 3.1.

    2. but even if you want it on a single and from uninstall
    the old computer, you can't do it. It is because if it came with the
    computer, it is an OEM version and the biggest drawback to he a
    OEM version, is that its license it permanently binds to the first
    It is installed on the computer. He can never legally be moved to another
    computer, sold or assigned (except with the original computer).

  • How do you start a new line in the paragraph style?

    New user of the trial and cannot understand why a seemingly simple operation does not...

    How do you start a new line in a paragraph block?  When I hit the Enter key, it returns to the front of the same line, overwriting the same line over and over again.

    1. click on the text tool.

    2 hang out in a paragraph block.

    3A started typing and noticed that when it reaches the end of the paragraph block, he just finished at the beginning.

    Frustrated to could use more help.

    In the set of main characters in Auto Panel. It seems by default is 1.25 pt that makes it behave as you describe.

  • How to query start a new line in the column?

    How to query start a new line in the column?

    Exam

    SELECT ID, username | host name, details of xxx;

    on the 2 column, I need result below:

    Username ID | hostname in detail
    1 user1 xxxxxx
    host1
    2 user2 xxxxxx
    host2

    Kind regards
    Suradech

    Something like that?

    SQL> WITH tbl AS (SELECT 1 id,'user1' uname,'xxx' dtl,'host1' hname FROM DUAL UNION ALL
      2               SELECT 2 id,'user2' uname,'yyy' dtl,'host2' hname FROM DUAL UNION ALL
      3               SELECT 3 id,'user3' uname,'zzz' dtl,'host3' hname FROM DUAL
      4               )
      5  SELECT id,uname||dtl||chr(10)||hname FROM tbl;
    
            ID UNAME||DTL||CH
    ---------- --------------
             1 user1xxx
               host1
    
             2 user2yyy
               host2
    
             3 user3zzz
               host3
    
  • How to create a new folder in the voice tab 7 hp slate

    How to create a new folder in the voice tab 7 hp slate?

    I wish to cretae a folder in my home page.

    Please help me...

    Hello and welcome to the HP support community!

    You want to organize your icons in folders, or put a shortcut of data on your home page folder?

    The first is easy, this last not so much.

    Just hold your finger on an icon, and then drag it on another similar icon.  A "folder" will be done with the name "unnamed file".  Press and hold the words to change the name of the folder.

    I'm not aware of a way to file a record of data on the homepage...

    WyreNut

  • Creation of new line in the tree

    I have create a tree ADF of VO on my page and I want to add new line to the tree when the button is clicked.

    How to do this?

    Drag - move createInsert of the VO as button. It will create new line.

  • How can I draw a line around the edge of a piece of property that I shot a video clip of 13 elements?

    How can I draw a line around the edge of a piece of real estate in a video clip with 13 elements?

    KING OF THE SKY

    First 13 items on what operating system? Have you updated 13 to 13.1 still using Help Menu/updates to date of an open project?

    Your question immediately... you could try something like this

    In this scenario, you start with your video on video 1 track with the Timeline indicator placed in the appropriate location of content timeline.

    The Titler line file created will be automatically placed at the position of the indicator in the timeline.

    Text Menu/New/default of titration / and select the Section forms.

    The Titler file goes to Video Track 2 above the video on the video 1 track.

    Select the line tool in the section shapes and draw your line on screen correspond to the where you want it to appear in the video below.

    Your image of the line is the line on transparent background where the content below shows through the transparent areas in this image of the line.

    Please consider. If any questions or need any clarification on the above, do not hesitate to ask.

    Thank you.

    RTA

Maybe you are looking for