Thanks Michael for explaining the intent of the MoI Notes feature.
Given that Notes is not a good fit for my script's large Help File, I decided to use a variant of Brian's (bemfarmer) & BurrMan's ideas:
Rather than use an HTML file or plain text, I'm using a PDF file. The PDF contains text, embedded images and links to websites (even YouTube videos).
If you have a MoI script named FooBar:
Write a help file in MS Word. Paste in images and links as needed. Save the Word document as PDF to your commands subdirectory.
Add this division to the script's FooBar.htm
html code:
<div>
<!-- Help file is located at:
On Windows: C:/Users/<username>/AppData/Roaming/Moi/commands/FooBarHelp.pdf
On Mac: /Users/<username>/Library/Application Support/Moi/commands/FooBarHelp.pdf
-->
<moi:LabelButton onclick="moi.filesystem.shellExecute( moi.filesystem.getAppDataDir() + 'commands\\FooBarHelp.pdf' );">
<img src="moi://ui/icons/HelpIcon.png" style="width:2em;"/>
Help
</div>
When finished, C:/Users/<username>/AppData/Roaming/Moi/commands/ [ On a Mac: /Users/<username>/Library/Application Support/Moi/commands/
contains:
FooBar.js
FooBar.htm
FooBarHelp.pdf
When Help is clicked, your browser opens and displays the Help contents.
Note: Even though Microsoft Edge is not my default browser, Edge opens when I click Help. Microsoft Edge comes with a built-in PDF reader that lets you open your local pdf files, online pdf files, or pdf files embedded in web pages. Chrome should also view PDFs. Other browsers may require a PDF plugin.
Ed Ferguson
|