Forum Discussion
ShaeZeitz
3 years agoCommunity Member
Javascript for sending Storyline 360 text entries via email
Within SL, I've been trying to initiate an email via javascript that contains text entry content, but I cannot get it to work. Essentially, I want the learner to be able to send their notes to thems...
SaraCollister
2 years agoCommunity Member
Hi, I'm able to bring over the text entry into the email body but it loses all formatting and merges into one long line of continuous text. Does anybody know how to bring over the formatted texts/keep the paragraphs?
Any help is appreciated. TIA :)
My current JS -
var player = GetPlayer();
var email='';
var user = player.GetVar("UserName") ;
var text = player.GetVar("TextEntry") ;
var subject = "Journal Exercise Notes" ;
console.log("mailto: "+user+" | "+text)
var emailBody = player.GetVar("TextEntry");
var mailto_link = 'mailto: '+email+'?subject='+subject+'&body='+emailBody;
win = window.open(mailto_link, 'emailWin') ;