Line breaks in text editor
Hi,
I am facing the problem that when I read the content of the
texteditor, store it in a javascript variable, and then write it
again into the editor area, all line breaks (not html line breaks,
just the line breaks for the code structure) are gone.
For Example if the content of the Editor is the following:
Test line 1
Test line 5
If I know call my function the value of the texteditor will
be somethign like: "Test line1 Test line 5"
I tried finding the linebreaks and replacing them (either \n,
\r or \n\r) but had no success in doing that.
My code of the function:
var theDom=dw.getDocumentDOM();
var temp = theDom.documentElement.outerHTML;
theDom.documentElement.outerHTML="";
theDom.documentElement.outerHTML=temp;
So I assume Javascript and dw are using different formats,
but I cant find much information about whats being used.
Any help appreicated!
Best,
David
Hi Brent,
Use CHR(10) in text editor for a new line. for example( 'SAP' & CHR(10) & 'Visual' & CHR(10) & 'Composer') will display like,
SAP
Visual
Composer
Hope it helps....
Regards
Basheer
Similar Messages
-
Can you put line break in text in the data box when creating a chart.
i.e. if you have a bar chart with text underneath each bar, can you break it when you’re entering it instead of manually afterwards
Thankshttp://help.adobe.com/en_US/illustrator/cs/using/WS3f28b00cc50711d9fc86fa8133b3ce158e-8000 .html
See "Enter labels" -
Limit number of lines in a text editor
Hello.
In my program, i'm creating a text zone and i need to limit the data users will put in this zone.
To create that, i'm using the object cl_gui_textedit. I've looked in the methods of this object but i wasn't able to find one that will limit the number of lines of the text editor.
Did i miss it ? Does anybody knows how i can for example limit the input zone to 5 lines ?
Thanks for your help.
Here's my code
IF g_editor IS INITIAL.
* Instanciation du container pour la zone de texte
CREATE OBJECT g_textedit_custom_container
EXPORTING
container_name = 'TEXTEDITOR'
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5.
IF sy-subrc NE 0.
* add your handling
ENDIF.
* Création de la zone d'édition du texte
CREATE OBJECT g_editor
EXPORTING
parent = g_textedit_custom_container
wordwrap_mode = cl_gui_textedit=>wordwrap_at_fixed_position
wordwrap_position = 68
wordwrap_to_linebreak_mode = cl_gui_textedit=>true.
ENDIF.I just notice there is a method SET_HEIGHT but this one is implemented in CL_GUI_CONTROL.
I tried this :
CALL METHOD g_editor->set_height
EXPORTING height = w_height.
But in fact, i never enter the method.
Do i have to create a CL_GUI_CONTROL object ? If yes, how do i link it to the CL_GUI_TEXTEDIT.
Sorry if some questions mays seem obvious. It's my first object abap program. -
File adapter-How to set line break in text file-split record into two lines
Dear Guru's,
I have to solve following problem with XML (with mulitiple records) to TEXT file scenario using file adapter. I have to output for ever ONE data record in XML always two identical lines in text file. Second line should have a little bit different mapping in few fields like date,... So I did duplicate fileds in my output structure in mapping and need to know how to set line break in the middle and see half of structure in first line and next structure half in second line
My output structure in mapping is:
CASHFLOW
- INTERFACE
- GESELLSCHAFT
- ANWENDUNG
- PRODUKT
- VERTRAG
- BETRAG
- WAEHRUNG
- DIRECTION
- BEWEGUNGSTYP
- FAELLIGKEIT
- ZINSFESTSTELLUNG
- ZAHLUNGSTAG
- RENDITE
- INTERFACE2
- GESELLSCHAFT2
- ANWENDUNG2
- PRODUKT2
- VERTRAG2
- BETRAG2
- WAEHRUNG2
- DIRECTION2
- BEWEGUNGSTYP2
- FAELLIGKEIT2
- ZINSFESTSTELLUNG2
- ZAHLUNGSTAG2
- RENDITE2
Question is how can I set on receiving file adapter in Content Conversion Parameters that fields from first structure half INTERFACE...RENDITE should be outputed in one line and fields from second half of structure INTERFACE2...RENDITE2 should start on second line in final text file.
I'm getting at the moment one line only and I need to know how can set line break so that second line starting with INTERFACE2(CA)...RENDITE2 will start in new line.
CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",2,12,2009-01-28,2009-01-27,2009-01-28,"0.0000000",CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",1,10,2009-01-27,2009-01-27,2009-01-27,"0.0000000"
This should be final output:
CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",2,12,2009-01-28,2009-01-27,2009-01-28,"0.0000000"
CA,"0100","7","512",20090127010001,-12454762586.6800,"EUR",1,10,2009-01-27,2009-01-27,2009-01-27,"0.0000000"
My file adapter settings:
RecordsetStructure=CASHFLOW
CASHFLOW.fieldNames=INTERFACE,GESELLSCHAFT,ANWENDUNG,PRODUKT,VERTRAG,BETRAG,WAEHRUNG,DIRECTION,BEWEGUNGSTYP,FAELLIGKEIT,ZINSFESTSTELLUNG,ZAHLUNGSTAG,RENDITE
CASHFLOW.fieldSeparator=,
CASHFLOW.endSeparator='nl'
CASHFLOW.fieldNames=INTERFACE2,GESELLSCHAFT2,ANWENDUNG2,PRODUKT2,VERTRAG2,BETRAG2,WAEHRUNG2,DIRECTION2,BEWEGUNGSTYP2,FAELLIGKEIT2,ZINSFESTSTELLUNG2,ZAHLUNGSTAG2,RENDITE2
CASHFLOW.fieldSeparator=,
It wont help if I add two identical structures in mapping because in output i would see for multiple entries section with first lines only and after that section with second lines only. And CASHFLOW is one part of more complex mapping ...
(This is final output structure RecordsetStructure=HEADER,CASHFLOW,CONDITION,REFERENCE,CONTRACT - more sections with different data and all these should have duplicate lines at the end)
Thanks a lot for any help
Cheers
Marian
Edited by: Marian Luscon on Jul 14, 2009 11:44 AMHi Ivan,
right, I did test just for sure.
Putting constant 'nl' into field CASHFLOW-INTERFACE1 didnt help - still getting one line instead two lines.
CA ,"0100" ,"7" ,"512" ,20090127GTP101 ,-12454762586.6800 ,"EUR" ,2 ,12 ,2009-01-28 ,2009-01-27 ,2009-01-28 ,"0.0000000" ,'nl' ,"GTP1" ,"7" ,"512" ,20090127GTP101 ,-12454762586.6800 ,"EUR" ,1 ,10 ,2009-01-27 ,2009-01-27 ,2009-01-27 ,"0.0000000"
So there is still question. Is there any way (mapping,...) how to output always 2 lines in text file for one record in XML. It always does 1 record in mapping structure = 1 line but we need 2 lines ...
Example:
Input: 4 records in XML
Output: 8 lines in final text file ...
Thanks to you all guys
Marian -
FXML - Line break for text-attribute (LABEL)
Hi!
How to define a text with a line break for a label in FXML?
For example, I cant get this to work (\n):
<Label text="Break\nLine"/> Thanks,
JörnHi,
If you use SceneBuilder Developer Preview 1.1 you will see that SceneBuilder generates this:
<Label layoutX="266.0" layoutY="172.0" text="Break Line" />To enter a new line in a text label in SceneBuilder is easy (even though a bit hidden).
If you hover the mouse over the label text property in the Inspector (right hand side), you will see a little cog menu fading in. If you click on it - you will be able to 'Switch to multi-lines mode' - you can then enter a text with new lines - then save the file and see how it's been handled...
hope this helps,
-- daniel -
Saving the text in text editor changes text line format
In my program I have an output witha text editor box where
we type in text and save , and if we want to print it it prints it out
on a smartform. When I type in a text on the text editor box for example :
"This will include a policy and best practice for
what files can be stored on the server and where
they should reside. The policy will include
required ownership of each folder and required
authorizations for access to folders. Also
included in the policy will be a section describing
best practices on the file and folder naming
conventions. Anew file struicture of the drive that
better aligns with the business. An drive with only
four folders at the root level also will be de"
After I type in this text in teh text editor and try saving it
, it save sthe text but shows up with lots of gaps like below.
"This will include a policy and best practice for
what files can be stored on the server and
where
they should reside. The policy will include
required ownership of each folder and
required
authorizations for access to folders. Also
included in the policy will be a section
describing
best practices on the file and folder naming
conventions. Anew file struicture of the drive
that
better aligns with the business. An drive with
only
four folders at the root level also will be de"
I am not preety sure why on saving teh typed text it chnages to this format.
I would like to have my program save it as is typed. Is this possible to do so
and how?
Thanks.Hi Aarav,
Check the internal table used to store the text is having line length 100. Change that to 200 or more . You can see the difference . If still the problem persists, enter each line in the text editor and conclude each line with a carriage return( ENTER )
key press.
Hope this will help you.
Regards,
Smart Varghese -
Hi,
I have a BIP Report.
The report includes the layout of a free text column. This text goes towards the right side for sufficient length.
I want to wrap the text or line break this text.
In the rtf template, I am using the following formula:
<?html2fo: OUTPUT_NOTES?>
Any Ideas?Dear,
Add the UDF's on the marketing document you want the tax break up.
Apply FMS using below queries and call these UDF's on your PLD.
FOR BED
DECLARE @Amount as Numeric(19,2)
DECLARE @Rate as Numeric(19,0)
DECLARE @TAmount as Numeric(19,2)
set @TAmount =$[$38.21.Number]
SELECT @Rate=STA1.Rate
FROM OSTC INNER JOIN
STC1 ON OSTC.Code = STC1.STCCode INNER JOIN
STA1 ON STC1.STACode = STA1.StaCode Where OSTC.Code=$[$38.160.0] And STA1.SttType='9' order by STA1.EfctDate desc
set @Amount=(@TAmount * @Rate)/100
Select @Amount
For Cess
DECLARE @Amount as Numeric(19,2)
DECLARE @Rate as Numeric(19,0)
DECLARE @TAmount as Numeric(19,2)
set @TAmount = $[$38.U_BED.Number]
SELECT @Rate=STA1.Rate
FROM OSTC INNER JOIN
STC1 ON OSTC.Code = STC1.STCCode INNER JOIN
STA1 ON STC1.STACode = STA1.StaCode Where OSTC.Code=$[$38.160.0] And STA1.SttType='8' order by STA1.EfctDate desc
set @Amount=(@TAmount * @Rate)/100
Select @Amount
For HCess
DECLARE @Amount as Numeric(19,2)
DECLARE @Rate as Numeric(19,0)
DECLARE @TAmount as Numeric(19,2)
set @TAmount = $[$38.U_BED.Number]
SELECT @Rate=STA1.Rate
FROM OSTC INNER JOIN
STC1 ON OSTC.Code = STC1.STCCode INNER JOIN
STA1 ON STC1.STACode = STA1.StaCode Where OSTC.Code=$[$38.160.0] And STA1.SttType='10' order by STA1.EfctDate desc
set @Amount=(@TAmount * @Rate)/100
Select @Amount
This will help you.
regards,
Neetu -
Hi there,
normally the forum software does insert automatically a line break for text posting. If i write a
code posting with the {code} parameter, it does not do like that. Sometimes the posts runs
out of the displayed field.
It is a bug or wanted ?
Regards SteffenThanks.
But now, I have a syntax error.
BEGIN OF xml_line,
data(256) TYPE x
END OF xml_line.
DATA: lt_xml_table TYPE TABLE OF xml_line,
ls_xml_table TYPE xml_line.
LOOP AT lt_xml_table INTO ls_xml_table.
CONCATENATE ls_string cl_abap_char_utilities=>cr_lf INTO ls_string.
MODIFY lt_xml_table FROM ls_xml_table INDEX sy-tabix.
CLEAR : ls_xml_table, ls_string.
ENDLOOP. -
My requirement is to show a text editor on the screen.allow the user to type in it. (Example he type n lines). Store the content in D/B table. Next time i display the screen, all n lines should be displayed.Now if he enters m lines in addition to n lines ... then i should display n+m lines in the text editor.
How can i do that.Hi Karthik,
Go through program <b>RSDEMO_DRAG_DROP_EDIT_TREE</b>.
Reward if this helps,
Satish -
Text pasted into Dreamweaver does not bring in line breaks, paragraphs
This has happened to me a couple times and a quick web search has not yielded satisfaction. I've copied text from a web page, tried to paste it into an html doc in Dreamweaver and it all comes in as a single long line. Same clipboard pasted into other editors shows with line breaks... Paste Special in Dreamweaver has not worked for me. Oh... got it, I've been pasting into Design view.. pasting into Code view brings it in properly... Thanks!
Use Edit > Paste Special > Text with Structure.
Nancy O. -
Problem in formatting of long text -- line break not recognized.
Hi ,
We have a PO smartform in our SRM system and we are facing problem with formatting of long text on the smartform for long texts maintained for the PO.
for ex, we maintain the long text as --
"this is long text for item 1.
1. this is line 1.
2. this is line 2."
On the smartform it is displayed as --
this is long text for item 1. 1. this is line 1. 2. this is line 2.
So basically, the line breaks in the text are not considered in the smartform .
Any suggestions on how to fix this issue ??
Thanks.Hello Harmeet,
Which Std. FM are you using to fetch the PO texts? If the PO doesn't exist in your system, i'm afraid you cannot use Include Texts as mentioned by Harsh.
As an alternative you'll have to create a table & pass the text lines to it! I don't think SmartForms are not smart enough to identify new-line character.
BR,
Suhas -
How to put line break in the text
Hi guys,
This is a simple problem.i don't know how to concat a line break while creating a text.
I am looping through the results of a query and want to form the text using the results.
For each row of the resultset,I want to create a new line in the text i create.
I was wondering how to put a new line in the text.
I thought I can concat '\n' ,but it does not work.
the code snippet in the procedure is :
for c1_rec in c1 loop
vMsg := ' There are ' || c1_rec.total ||
' documents of type ' || c1_rec.doc_type || '\n' ;
end loop;
Please give the solution.
Thanks in advance.Thank you Mark.
I tried your suggestion.But line break is not working in email.
Here is how my code is
in procedure 1 ,i create the message String as :
for c1_rec in c1 loop
vMsg := vMsg || ' ' || today_str || ' - ' || c1_rec.total ||
' Total inbound documents from : ' || c1_rec.target_value || CHR(13)||CHR10) ;
dbms_output.put_line(' ' || vMsg);
end loop;
--here sending mail calling another procedure
sendmail( '[email protected]' ,'[email protected]' , 'Test Subject ' , vMsg );
In Procedure 2( i.e sendmail procedure )
i am preparing email server connection from and to adresses .Then i am preparing and sending message as
crlf VARCHAR2( 2 ):= CHR( 13 ) || CHR( 10 );
conn:= utl_smtp.open_connection( EmailServer, Port );
utl_smtp.helo( conn, EmailServer );
utl_smtp.mail( conn, SENDER);
utl_smtp.rcpt( conn, RECEIVER )
mesg:= 'Subject: ' || SUBJECT || crlf ||
'Date: '||TO_CHAR( SYSDATE, 'Dy, dd Mon yyyy hh24:mi:ss' )||
crlf ||
'From:'||SENDER|| crlf ||
'To: '||RECEIVER || crlf ||
'Content-Type: text/html; charset=ISO-8859-1' || crlf ||
'' || crlf || MESSAGE ;
utl_smtp.data( conn, mesg );
utl_smtp.quit( conn );
even now the mail we are getting is not having the line break.I am having line break in dbms output,but not in the mail.
Is there any mistake how I am sending the mail.Or is there any other way we can put line break in the text
Thank you. -
A sentence in rich text (change in Options, Delivery format) appears as a single sentence in browser. But when I check the page source I see that sentence has been broken in to multiple lines. Why is this done? Isn't this a bug?
When viewed in a browser or application that supports rich text this does not create any problem since the line breaks are not taken into account . But I am trying to extract the text from this html and display in a nonHTML application like notepad.
Is this done on purpose?
For eg.
In browser - Honesty is the best policy
In View HTML Source -
Honesty
Is the
best
policy.lets start at the beginning.
There is no such thing as rich text email, unless it in internal corporate stuff like MS Exchange, Lotus notes etc. EMail on the internet is HTML or Plain Text.
I have no options > delivery format in my settings. Is this something to do with Outlook perhaps?
Then there is your image. All those MSO objects. They stand for Microsoft Office Objects and indicate the source of the HTML as being Outlook or at least Microsoft Office. All in all I think your asking about Microsoft actions on a Mozilla forum. -
I basically would like to insert a few extra instructions into a previously created Progam Line Array without having to re-enter the entire program again.
Andrew,
I just took a look at the HP16522A Instrument Driver, and it looks like that Program Line Array is handled programmatically as an array of clusters, that is then parsed out and formatted as strings to send to the instrument. I can see two ways of getting the data from your text editor into LabVIEW in a useable format. You could use the File I/O VIs to read the string data from the file, then parse and format it appropriately to add to the Program Line Array...I can also see getting that text data in, formatting it as strings, then simply adding it into the command string you send to the instrument right before the Write function.
I think both of these methods would work, although I think the first one will probably be easier for you to deal with, since you wo
uld be using the Program Line Array cluster format the entire time.
I wish you luck with your application. Have a pleasant day.
Sincerely,
Darren Nattinger
Applications Engineer
National Instruments
Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman -
Hi all,
I have a requirement to create a text editor.
I created a Text editor,but where i need only 15 lines to update into it .
But it showing 22 lines and some times 30 lines .
Anybody let me know how to update Text editor with 30 lines .
Regards,
Madhavisolved myself
Maybe you are looking for
-
How to delete a job in background programatically after 10 sec
Hi all, Can anyone tell me how to delete a job in background programatically after the transaction is trigerred in 10 sec. Yours help will be greatly appreciated Yathish
-
Web Service call from java UDF in message mapping
Hi, Is it possible to call a web service from inside a java UDF in message mapping? The webservice can be any standard one. If this is possible please let me know how this can be done. Regards, Shiladitya
-
Downloaded files will not move or allow to be edited?
Hi, I hope this is the correct place to ask this question. I currently have two hard drives, a HDD and SSD with HDD as the windows install/main drive. When I download files from google chrome, they go straight into my SSD in a 'downloads' folder. A
-
In My Noikia 5800XM, I am not able to change my Me...
Hello, I am using Nokia 5800 XM. I have enough space(arround 4GB) in my memory card but I am not able to change my messge storage location to "Memory card". and I think there no issue of my memory card, its working fine. When I am trying to change m
-
Content of the Namespace-property of a report deleted bei TFS
Hello, We use the SAP Crystal Reports for Visual Studio 2010. We store the reports of a .NET-project in a folder named Berichte. To have folder and namespaces synchron we set the Namespace-Property of each report in this folder to Berichte. When anot