How to open a local HTML file in Safari on an iPad - html

I'm teaching a Year7 class via Zoom on writing HTML, and I have one student on an iPad (the rest are on desktops/laptops), and they're not able to get their webpage to open in Safari (I'm using Chrome on Windows, which of course is simply a matter of double-clicking on the file). I'm trying to see what she sees, but I think Zoom is possibly not showing me the pop-up dialogues. She is using Notes to write the page (which looked to be the closest iOS equivalent to Notepad).
I Googled and sent her a few blogs, but still not working. I said she needs to click on Share and look for something like "copy path to file" or "copy link", and then paste that into the Safari address bar. She said when she did that Safari was showing the source code, not the rendered page. When she just taps the file it opens in Notes, not Safari. That made me suspect her file was actually index.html.txt (she tells me she has extensions switched on), but when I sent her my own file, which is definitely only index.html, she says the same thing is happenning.
Is anyone able to give me some definite step-by-step instructions (this is for a Year 7 student) on how to open their local HTML page in Safari?
thanks,
Donald.

Safari iPad no longer supports access to local or iCloud files. A number of iPadOS apps will however allow a user to view, edit, and test html code in files stored in local iPad, iCloud, or third party (e.g. Google or Dropbox) storage folders. One needs only to search in the App Store for “html editor” to see the list. Some of the apps have features that rival or exceed those found in tools on desktop (laptop) systems.

I had the same issue today on ios15.
There is a free app called Koder available on the App Store which will let you edit and view the HTML file. I’m no expert but the editor looks pretty fully featured at first glance.

Sorry to say but an iPad is obviously not the best place for simple HTML editing. At least not with the default apps available on iOS.
Given an existing HTML File one can use Files app to navigate to it and open it with double click. This will open the file in a very simple viewer wich is at least able to render the HTML. As a developer i bet its using WKWebView which is basically Safari's HTML View.

Turns out Microsoft Edge, unlike Safari, can still open local html files. Discovered in this answer. To wit:
Install Microsoft Edge from the App Store
Open Files (or whatever file browsing app you like).
Open the file, then tap the Share button to send to another app.
Scroll across to "More...", choose Edge, and voila!

Related

OneNote to open link in Chrome without Chrome being default

I have a very simple question I could not find answer for myself: I want links in OneNote to open in Chrome.
Note that the default browser is IE and I cannot change it (not admin etc).
Tried: "chrome_path url" - didn't work. Everything I could think about didn't work.
Please provide explicit solution so that link from within OneNote opens in Chrome rather than in IE.
To note, there are multiple links, so batch file won't do in this case.
Thank you in advance!
I had a little go with testing some ideas that I had though I'm very new to OneNote. It's easy enough to open Chrome from a hyperlink:
Select text to link
Add link
Select the file icon and navigate to chrome.exe. In my instance - C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
I believe you cannot pass arguments to the exe as it is considered a security issue. This certainly used to be the case and I'm not sure if they have modified their thinking since. The only way I can think of is to create a batch file which includes your ideal website and link to the batch file:
"start chrome http://www.youtube.com"
I found two ways to do it, though neither is the perfect:
There is a 3rd party OneNote add-on which adds more browsers in the right-click menu. Though it is not free and maybe can't be installed on restricted computers.
It works only on OneNote docs which are saved onto Onedrive. Open the OneNote page which has the links right in the Chrome, not in the desktop app. Then any links you click will open in the same browser. You can get the address of the OneNote page by clicking on 'Copy Link to Page' in OneNote app, then paste it to a notepad. Copy the first url to Chrome's address bar.
For those who has admin right, this problem can be solved by following Make Chrome your default browser. It is set at machine level, not onenote level.

Editing a chrome extension

I use the extension New Tab Wallpaper for Google Chrome. I am wondering if it's possible to modify it so that it doesn't show the annoying Settings button on the bottom right corner. Or at least doesn't appear unless you move your cursor down there.
screenshot of new tab page
Looking at the extension in the Chrome Web Store, it doesn't look like the author linked the project to a homepage or an open source code repository such as GitHub.
That being said, if you really wanted to alter the extension, you can find the code on your computer, see this answer regarding where to find the extension on your computer for various operating systems. A Google Chrome extension is simply HTML, CSS and JavaScript.

How to view a pdf file in the browser,when clicking on a link

I have developed an application using HTML 5. To make the application compatible with the mobile devices I have used cordova/phonegap.
Now the problem is that, the PDf files which is there inside the application is only getting downloaded, when clicked on the link. I need to get it opened in the browser, when clicked on the link. It works fine with the PC. But not with the mobile devices.
I stored the link to a variable and passed that variable to google. Now using some sort of services from google, the link is getting opened in the browser.
I tried installing inAppbrowser plugin also.
window.open(Furl, '_system', 'location=yes');
This was the line of code used, where Furl is the name of the variable, into which, the url address of the pdf file is passed.
This line of code works fine, when url address of a webpage is passed to the variable. But not with the pdf files.
Apart from that idea, is there any other solution for this problem?
Can someone help me out with this problem?
-Thank you
As stated already on a comment, it is possible on modern browser since they have in-built PDF viewer. This isn't the case for Android or iOS currently. What you could do is to convert the PDF to PNG image and then show that. There is a PDF2PNG plugin available for this purpose. Also, if you only need to support iOS 6 & 7, you can take a look at the PDF Viewer plugin.

Not able to copy text,XPath or other attribute from the chrome developer tool

I followed the approach mentioned in how to emulate a mobile (android) browser on desktop
to project the mobile webpage's properties on desktop chrome browser. I was successfully able to do that but now I have some queries as mentioned below, please let me know your inputs on that
a) How to use the "Select element option" of chrome developer toolbar to view an element's property for a mobile webpage. In normal desktop chrome browser we have the web page displayed and below that the developer toolbar is displayed and we can easily spot the element using a pointer but with mobile webpage displayed on desktop chrome browser i am not able to use this option as the webpage is not displayed.
b) I tried to copy the xpath and other things from the displayed HTML (HTML of mobile webpage on desktop chrome browser) but it gave me an error that "You need to install a Chrome extension that grants clipboard access to Developer tools". I installed one such extension named: "Auto Copy" but then also I was not able to copy. Please let me know how to go about it.
Thanks a lot in advance,
Namit
For (B) – Judging from the discussion when that message was introduced, it sounds like you need to roll your own simple custom extension to enable clipboard access. Here's a sample manifest.json – I haven't tested it out myself, but it looks pretty straightforward. The extension development Getting Started guide explains how to turn a file like this into a working extension and install it locally.

Is there any way to communicate between my .exe application and Firefox?

Is there any way to communicate between my .exe application and Firefox?
Because, I have my own webpage. I'm using FireFox to browse it.
I have an application (in c++) to process a piece of HTML code from my webpage within FireFox. My application can print something directly to printer (raw print).
Since now, I coudn't access firefox's DOM content (page HTML source) from outside firefox; Also, I coudn't print directly to printer (raw print) from firefox.
Now, I'm looking solution for this problem. Here are my possibilities:
1.) My web page I can copy my related text to clipboard.
2.) My web page I can write my related text to Firefox's cookie.
3.) My web page I can write my related text to a file from client's PC.
4.) Any other way to send my related text to my .exe application.
But I don't know how can I do:
How can I copy to clipboard within firefox,
How can I read FireFox's cookie from my .exe application,
How can I create file in client's PC.
Is there any way to communicate between my .exe application (in c++) and Firefox?
You have to write an extension for firefox an use its API. For example see nsIProcess:
"The nsIProcess interface represents an executable process."
Assuming that your page has a true URL outside of FireFox, you could solve your problem by registering a custom protocol handler. E.g. register "X-myprettyprinter". Then, in FireFox, from http://www.example.com/index.html you can redirect to X-myprettyprinter:http%2D%2Dwww.example.com/index.html. FireFox doesn't know how to handle the X-myprettyprinter protocol so it hands off the URL to the OS, which then hands it to your registered application. Bonus: it works for all browsers. Downside: you have to retrieve the URL yourself and render the page again in-process
You could write an addon for firefox that allowed some form of integration with your application.
Here is a tutorial on writing firefox addins.
The best way to do this is to skip the .exe application and just make an ad on for FireFox, Take a look at the FireBug ad-on. It can pull certain codes out of a web page, If you use the API I bet you could do what your .exe program should.