Forum Discussion
Print ANYTHING in StoryLine
By adding a new tab in the player properties panel and assigning it to execute the "window.print();" JavaScript, you can allow your participants to print any/every slide in your StoryLine projects including "Notes" or "Certificate" slides! No need to create a complex JavaScript course certificate solution, simply build a beautiful slide and let your users print it directly from the StoryLine player!
For SL 3 and 360 users, you can also move, reformat, hide, and reveal the button so you can take control over what users can print.
I've included the screen shots I used in the video in the attached Word document along with the JavaScript code snippets and an SL3 .story file.
- JamesFinder-b89Community Member
Awesome!
- wayneedmondsCommunity Member
Great, we were looking for something to resolve these types of issues. I will test this out soon!
Thanks!
- AGoldthorpeCommunity Member
Great tutorial Owen! Thanks for sharing.
- onEnterFrameCommunity Member
Nice job Owen!
- TracyParishSuper Hero
Fantastic share. Thanks for showing us this one. Liked the way to recorded the video to explain how you did all the steps. Nice job.
- TriciaRansomCommunity Member
Thank you!
- LucyWood-cf5987Community Member
This is wonderful! I'm a SL2 user and know nothing about JavaScript, so this is easy for me to add.
Is there a way to turn on/off the custom tab for select slides, as there is in the base layer settings for the pre-set tabs?Thanks!
- OwenHoltSuper Hero
Unfortunately no (at least not by the built in functionality); custom tabs are not included in the Slide Properties 'Custom for the selected slides' window.
However.... IF (and you will notice that is a big IF) you are publishing your SL2 using HTML 5... you can use the following to hide the button. Note that this is for SL2 only; the identifiers changed with SL3/360 as noted in my original post.- Find the button/tab and rename it. You can do this on your first slide at timeline start using the following JavaScript:
$(".customlink").attr("id","printButton"); - To hide the button/tab, use the following JS:
$("#printButton").hide(); - To show the button/tab, use this JS:
$("#printButton").show();
Note, this will only work in the HTML5 output of SL2.
- Find the button/tab and rename it. You can do this on your first slide at timeline start using the following JavaScript:
- JaneMadukeCommunity Member
Thanks so much, Owen! I love the way you've used the Chrome developer tools to find the names of the objects in the code. That's a trick I'm sure I'll use! Very well done.
- onEnterFrameCommunity Member
Hi Jane,
You may want to watch the recording of my webinar where I walk through how
to use the Chrome Dev Tools to find and manipulate stuff in Storyline.
http://elearningbrothers.com/webinar-hack-storylines-html5-output/Thank you,
James KingsleyNeed an awesome way to collect feedback?
https://www.reviewmyelearning.com/
Don't just collect feedback. Start a conversation.
ReviewMyElearning.com
- PatriciadeSouzaCommunity Member
Hi
I am never done any JavaScripting before - however was able to follow the tutorial to produce a print button in my project, (and show hide it on specific slides) - this is exactly what I need in my project :)
However if I also have an exit tab in my player - how do i identify which tab I want to move down to show up next to the volume button
With the exit tab included, both the Exit and print buttons are showing up next to the volume button, however the print button is no longer formatted and is visible on all slides, but the exit button only shows up on the specific slides as set up following the tutorial!
Can anyone suggest how to just have the print button by the volume button and the Exit tab to stay up on the top bar?
Thanks
- OwenHoltSuper Hero
StoryLine makes this slightly difficult by naming all of your custom tabs "#tab-customlink" so what you are experiencing is a result of the JS moving the first item named that that it comes across. The way around this is to give your custom tabs unique IDs and then referencing the IDs instead of the name.
Try adding the following:
$("#tab-customlink").attr("id","printButton");
and then update the rest of your existing code with #printButton replacing #tab-customlink
IF it is moving the exit button after taking these steps it is because the exit button is the first #tab-customlink in the page code that the JS encounters. So, we will rename it first and then repeat the process to rename the next one which should now be the print button. Try adding the following to name both tabs:
$("#tab-customlink").attr("id","exitButton");
$("#tab-customlink").attr("id","printButton");
and then update the rest of your existing code with #printButton replacing #tab-customlinkI haven't tested this yet but in theory it should work.