Copy link to clipboard
Copied
I want to add a button to my Azure Responsive HTML5 layout toolbar that when clicked, will allow the user to email a link to the current topic.
I was following the steps on Peter Grainger's site for this (Email this topic)
But it seems that I have to hard code this bit of the script: mailto:someone@theirdomain.com
Isn't the point of this button that users can choose where to send the link to? So how can I hardcode it?
Peter, if you're there, I'm sure I'm being totally daft but I can't work this out!
Using RH2019.
Copy link to clipboard
Copied
No, it works fine - when you select the link it launches your e-mail client and creates a new blank e-mail filled with that dummy text and a link to the page - the idea is that they replace the yourname@yoursite.com bit with whoever they want to sent it to.
Copy link to clipboard
Copied
Depends on whether you want to change it to an address of your choice or you can leave it blank.
See www.grainge.org for free RoboHelp and Authoring information.
Copy link to clipboard
Copied
I want the user to enter their own email address.
But if I leave the code exactly as it is, nothing happens when I click the new custom button. My email client (Outlook) doesn't launch.
Wondering if there are different steps required for RH2019?
Copy link to clipboard
Copied
Does the link work on Peter's site for you? It does for me.
Copy link to clipboard
Copied
You didn't say which version. For 2019 see the RoboHelp Reimagined sample
project. It's covered there.
Peter Grainge
www.grainge.org
@petergrainge
Copy link to clipboard
Copied
Jeff, yes the link on Peter's site works fine. Its when I paste the toolbar code into a custom toolbar button in RH that it doesn't work. The new button shows up fine but does nothing when clicked.
Peter, I'm using the Reimagined version of 2019. You mention a sample project - Is this on your site?
Thanks
Copy link to clipboard
Copied
The sample project comes with RH2019 - should be present on your machine already.
Copy link to clipboard
Copied
The samples should be installed in a folder under Documents (something like Documents > My Documents > My Robohelp Projects > Adobe Robohelp 2019)
However, when I installed a trial, for some reason this wasn't created. I had to copy the samples from the Program Files folder (Something like C:\Program Files\Adobe\Adobe Robohelp 2019\resources\data\template\projects)
Copy link to clipboard
Copied
Thanks. I've found the sample project but I don't see anything in it concerning setting up custom buttons to email a link to the current topic.
The script content provided on Peter's site looks very different from the content used for the other default custom toolbar buttons (print etc) which work fine in my output. Maybe it just doesn't work with the new RH2019.
Copy link to clipboard
Copied
Best to generate an output from it and then search.
It's at the end of the TOC topic.
See www.grainge.org for free RoboHelp and Authoring information.
Copy link to clipboard
Copied
I see the info about adding an email link to the TOC but that's not what I'm asking about.
I'm asking about adding a custom toolbar button that will generate an email containing a link to the current topic.
Here's my custom button:
And here's the script in the skin properties:
The script I'm using is from Peter's site:
window.location=('mailto:someone@theirdomain.com?Subject=Useful Information&body=This page might help: ' + window.parent.frames[1].frames[1].document.title +' ' + escape(window.parent.frames[1].frames[1].document.location))
I'd love to get to the bottom of this as it's a really nice idea.
Copy link to clipboard
Copied
I was hoping that might be an acceptable solution.
I have just tested adding a link to the TOC and to a topic using the new method and it's not working. I am wondering if whatever has broken that (it was working) is also clobbering the method on my site. Note though, that was for webhelp.
I have asked Adobe to check the new solution.
See www.grainge.org for free RoboHelp and Authoring information.
Copy link to clipboard
Copied
The built in solution does not seem to work now but it did earlier. I have reported that.
The toolbar solution on my site does still work for webhelp but not in a responsive layout. The text solutions on my site are still working in responsive layouts so I wonder if putting such a link in a master page or top right of topics would work for now?
See www.grainge.org for free RoboHelp and Authoring information.
Copy link to clipboard
Copied
Thanks for investigating Peter.
I will consider adding a text link but would really prefer the toolbar solution as I'm trying to unclutter my topics as much as possible. We'll see if it gets fixed for responsive layouts.
Copy link to clipboard
Copied
Your wish is my command. One of the Adobe developers has kindly provided me some javascript that you can add to the skin.
Go to the skin editor and select Custom Buttons. Click Add Button and give it a name.
Select that button in the Select Button dropdown
Add a button image.
Insert the line below in the Javascript OnClick Event
window.location.href = "mailto:someone@somedomain.com?subject=Issue in topic&body=Topic path is " + rh._.hashParam('t'); return false;
For anyone who does not want the topic url, the line is
window.location.href = "mailto:someone@somedomain.com?subject=Issue in topic&body=Body text here";
In both cases change the address, subject line and body text to what you want.
Hope that helps.
See www.grainge.org for free RoboHelp and Authoring information.
Copy link to clipboard
Copied
You can cut and paste the script above. The envelope icon will not be copied.
See www.grainge.org for free RoboHelp and Authoring information.
Copy link to clipboard
Copied
Does this work for RoboHelp 2017?
Copy link to clipboard
Copied
See Snippets (grainge.org) for Classic versions rather than reading through this thread that covers both Classic and New UI.
________________________________________________________
See www.grainge.org for free Authoring and RoboHelp Information