ToolBox - Help Page - HTML Management

2 次查看(过去 30 天)
Hello everyone,
I'm currently building a ToolBox for my custom Simulink library.
The integration of my custom help pages work fine as i want them to. (Help button in block mask opens the refering .html in the Help browser & the table of contents on the left works fine as well.) . In every custom page there is a hyperlink to a subpage or a related page similar to the official Matlab/Simulink documentation.
My "problem" is that if i use a hyperlink to another page a new tab is opened instead of using the same one as in the official documentation.
I tried modifiying the html page to target="_self as normally used in html but that didn't do the trick.
Now im unsure if it is because of the help browser properties that this isn't possible or im doing something wrong with my hyperlinks.
I'm creating my .html files by writing my pages as a livescript (.mlx) and hyperlinking the existing pages by calling matlab:web(-path-to-local-html-file-) and exporting it afterwards to .html.
Maybe there is a better way to link the pages im currently not seeing.
Thanks in advance.

回答(1 个)

colordepth
colordepth 2025-2-17
It seems that using "matlab:web(-path-to-local-html-file-)" will always open the link in a new tab. According to the documentation (https://www.mathworks.com/help/matlab/ref/web.html), there is no option to force URLs to open in the current tab.
When I checked the MathWorks Documentation Help browser and hovered over some URLs, it appeared that all links using "matlab:web()" opened in a new tab, similar to the "Acknowledgements" URL in the screenshot below:
However, using the "file:///" URL scheme can allow you to open pages in the current tab. Given that your approach involves local files, this method could be suitable.
You can try incorporating this approach in your live script to generate HTML pages that link to your local web pages. I have not seen many File Exchange toolboxes that create help pages directly in the MATLAB browser, but it sounds like a great UX enhancement for your toolbox users.

类别

Help CenterFile Exchange 中查找有关 Simulink Environment Customization 的更多信息

产品


版本

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by