In Search of an app on iPad to show HTML file directly from Shortcuts

I am searching for an iPadOS app that can be called via Shortcuts to read HTML files stored locally or in iCloud.

I have an HTML file that I generate as output from Curio. It shows a status shelf report. I store this in iCloud so that I can view it off line. I have a Shortcut to open the HTML. On my iPad, this defaults to PDFExpert.

While this is a workable solution, I would like to know whether an HTML viewer exists to simplify the process.

As further background, the HTML page used to open in Safari until some version of iPadOS disabled this option. Also, I am posting support notice to some of the iPadOS HTML viewer apps asking for this feature. Maybe someone here already knows that it existe.

—
JJW

Have you tried Readdle’s Documents?

Does another shortcut with a file picker and then Show Webpage passing the contents of the file work?

iCab Mobile will open local .html files – though iCab’s security seems a bit iffy. Readle Documents, as @JohnAtl mentioned, will also do that.

Opening the Share menu from an .html file selected in Files on iPad might reveal some other possibilities for your particular iPad.

Thanks. The file does open in PDFExpert. I am hoping for something that is “light weight” (e.g. strictly a Web viewer app) and that can be triggered by a Shortcut “open in” call.

—
JJW

I might be missing something, so I’m not sure that this would suffice, but would something like this work?

Replace “Shortcuts” with the folder where your file is, and replace “test.html” with the name of the file itself.

That’s weird, I have some .html files in iCloud. I see in Files there is no option to open in Safari. Why wouldn’t that be allowed? You can open html files on macOS.

Safari on iPad/iPhone no longer supports opening local or iCloud files via Shortcuts. This change happened at with some security update either to iOS/iPadOS or SafariOS some time ago.

—
JJW

1 Like

If you are successful at this I have to wonder. I am not. Quicklook shows nothing. I have an option to open in a different app (PDFExpert) and this does show the file.

I validated the html file and had no errors reported.

—
JJW

So iCab Mobile is recognized in Shortcuts. I get an annoying dialog box each time.

I have a request in to support asking what I can do to avoid this.

Thanks for the hint.

—
JJW

Oh yes. I confirmed it worked for me before I suggested it.

My file was just this


<h1>Hello</h1>

<p>World</p>

What folder is the HTML file in? Is it in the Shortcuts folder in iCloud?

Yes.

Perhaps the html is improperly or overly coded that it will not support being viewed in Quicklook.

I will dig further.

—
JJW

If you want to post it here or DM it to me, I will test it too and see if it works for me.

Thanks to @tjluoma for discovering that QuickLook does not do JavaScript.

It seems either PDFExpert or eventually iCab Mobile will be the way to go.

–
JJW

2 Likes

I tried opening the file in Google Chrome as the last step and it didn’t work either.

Firefox doesn’t even appear to be an option.

“Open in Safari” works great… on the Mac.

Would this work?

https://apps.apple.com/gb/app/inspect-browser/id1203594958

Can it be called from a Shortcut to open an HTML file that is stored in an iCloud folder? If not, then no, it will not work.

–
JJW

Simply offering a suggestion was there any need for that attitude?

Actually if you use Textastic text editor, add the relevant folder as an external folder, you can then open the file from shortcuts (in html code view) and then press the glasses icon to preview it including any included javascript and css files.

Just tested it using a shortcut so maybe that helps?

My clarification response was offered with no attitude.

I appreciate the suggestions.

–
JJW

Hey I made smth that is not that