Discussion Forums  >  Config Data, JSON, App Refresh

Replies: 5    Views: 102

WebNevees
Code is Art
Profile
Posts: 206
Reg: Oct 28, 2012
KL
11,660
05/03/13 05:15 AM (11 years ago)

Line Break in emailMessage text (Share by Email)

Hi folks, Can I pass a line break in the middle of "emailMessage" from either the CP or the config file to my sendemail or sharebyemail (BT_shareEmail) screens. I wan't to make it human-readable (!) when I have long text. Now that we are here how about sending html in the messages?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
05/03/13 05:41 AM (11 years ago)
For line breaks I think you have to add "\n" to your message, but that might break JSON, not sure. It is possible to pass HTML, but requires some extra coding to set content type.
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/03/13 06:04 AM (11 years ago)
It is a pain, yet it can be done with the \n characters. I had to do it in my app. I dread the day I tell the Client how to do it. :-( Perhaps some day, I will look at the PHP to fix it for self-hosters. -- Niraj
 
WebNevees
Code is Art
Profile
Posts: 206
Reg: Oct 28, 2012
KL
11,660
like
05/03/13 06:40 AM (11 years ago)
Wow it worked. Didn't break the JSON. Thanks Chris for the quick reply. I was just stuck with a 10 line long message which was actually non english and was RTL.....BAD EXPERIENCE!!! Thanks Niraj. I think we should work on some html for it. It can at least use the custom html type.
 
fusionsch
I hate code!
Profile
Posts: 516
Reg: Dec 28, 2010
Montreux Switze...
11,610
like
05/03/13 07:15 AM (11 years ago)
Just beware: if one day you change anything in that screen, the \n will get lost and you'll have to retype it!
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
05/03/13 08:52 AM (11 years ago)
Good to know, Fusion. Thanks! Cheers! -- Smug
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.