EdgeViewer - Modern HTML viewer plugin
Moderators: petermad, Stefan2, white, Hacker
- rg_software
- Member
- Posts: 121
- Joined: 2009-08-06, 12:59 UTC
- Location: Aizu-Wakamatsu, Japan
EdgeViewer - Modern HTML viewer plugin
Hi all,
I have created an early version of an HTML viewer plugin, based on MS Edge core. Since it has Chromium under the hood, it should be superior to HTMLView in terms of HTML compatibility. In addition to HTML, the plugin supports Markdown and AsciiDoc, so it can be used instead of my older Markdown plugin.
On the negative side, this version is slower to load (I am considering preloading the engine in the background; TBD) and requires Windows 10 or possibly Win 7/8 with Webview2 Runtime installed.
Your suggestions for eventual improvements are welcome.
I have created an early version of an HTML viewer plugin, based on MS Edge core. Since it has Chromium under the hood, it should be superior to HTMLView in terms of HTML compatibility. In addition to HTML, the plugin supports Markdown and AsciiDoc, so it can be used instead of my older Markdown plugin.
On the negative side, this version is slower to load (I am considering preloading the engine in the background; TBD) and requires Windows 10 or possibly Win 7/8 with Webview2 Runtime installed.
Your suggestions for eventual improvements are welcome.
Re: Modern HTML viewer plugin
Suggestion: make the plugin so that 32- and 64bit can be in the same folder.
Hoecker sie sind raus!
Re: Modern HTML viewer plugin
Why is a sub-dir EBWebView created under the Home-dir of TC
and not in the Plugins dir where the viewer plugin itself is installed ?
and not in the Plugins dir where the viewer plugin itself is installed ?
Windows 11 Home, Version 24H2 (OS Build 26100.3037)
TC 11.51RC3 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.1, Listary Pro 6.3.1.85
QAP 11.6.4.2.1 x64
TC 11.51RC3 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.1, Listary Pro 6.3.1.85
QAP 11.6.4.2.1 x64
Re: Modern HTML viewer plugin
First of all, thank you for your initiative to offer an alternative to the rather old yet working HTMLView plugin. 
If support for such a thumbnail view is doable, it would be great to be able to configure the size of the thumbnail size, preferably from within the plugin. With the old HTMLView plugin, you can set the thumbnail size by choosing a preset for the thumbnail view in Windows file explorer, but the available options there to choose from are rather limited, especially with regard to high-dpi monitors.

Is it possible to add support for showing directories, just like in the old HTMLView plugin? I'm using the HTMLView plugin to display graphic image files as thumbnails in quick-view mode. I find neither of the other available solutions, like the Irfanview plugin or TC's built-in thumbnail view, as convenient to quickly browse through several directories in search of a certain image.
If support for such a thumbnail view is doable, it would be great to be able to configure the size of the thumbnail size, preferably from within the plugin. With the old HTMLView plugin, you can set the thumbnail size by choosing a preset for the thumbnail view in Windows file explorer, but the available options there to choose from are rather limited, especially with regard to high-dpi monitors.
Re: Modern HTML viewer plugin
I get the error: "Cannot create WebView2. Error code: 127" when I try to open a .htm file with the viewer under Windows 7, It does open the files under Windows 10 though.
I will try and see if I can download Webview2 somewhere for Windows 7
I will try and see if I can download Webview2 somewhere for Windows 7
License #524 (1994)
Danish Total Commander Translator
TC 11.51rc2 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1390a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51rc2 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1390a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- rg_software
- Member
- Posts: 121
- Joined: 2009-08-06, 12:59 UTC
- Location: Aizu-Wakamatsu, Japan
Re: Modern HTML viewer plugin
OK, some replies to the comments so far:
I didn't think this is something to argue about at all; but if there is any real need for customizing the data directory, I can add it to the ini file.
I had some tech issues wth that, but they are resolved, and the next revision will have a single 32/64 package.make the plugin so that 32- and 64bit can be in the same folder.
This is suggested in the dev guide. TC gives me the "suggested location+name of the ini file where the plugin could store its data. This is <...> the same directory as the wincmd.ini. It's recommended to store the plugin data in this file or at least in this directory, because the plugin directory or the Windows directory may not be writable!"Why is a sub-dir EBWebView created under the Home-dir of TC
I didn't think this is something to argue about at all; but if there is any real need for customizing the data directory, I can add it to the ini file.
Yes, it is doable. Any idea how to register 'directories' in the extensions list? Maybe I'll have to abandon this list completely, just like HTMLView...Is it possible to add support for showing directories, just like in the old HTMLView plugin?
It is supposed to be here.I will try and see if I can download Webview2 somewhere for Windows 7
Re: Modern HTML viewer plugin
I use a portable TC tree and don't like having new dirs on the top level which are not belonging to TC itself.rg_software wrote: 2022-10-18, 23:39 UTCThis is suggested in the dev guide. TC gives me the "suggested location+name of the ini file where the plugin could store its data. This is <...> the same directory as the wincmd.ini. It's recommended to store the plugin data in this file or at least in this directory, because the plugin directory or the Windows directory may not be writable!"Why is a sub-dir EBWebView created under the Home-dir of TC
I didn't think this is something to argue about at all; but if there is any real need for customizing the data directory, I can add it to the ini file.
Why don't you store the EBWebView dir inside of your plugins dir ?
Windows 11 Home, Version 24H2 (OS Build 26100.3037)
TC 11.51RC3 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.1, Listary Pro 6.3.1.85
QAP 11.6.4.2.1 x64
TC 11.51RC3 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.1, Listary Pro 6.3.1.85
QAP 11.6.4.2.1 x64
- rg_software
- Member
- Posts: 121
- Joined: 2009-08-06, 12:59 UTC
- Location: Aizu-Wakamatsu, Japan
Re: Modern HTML viewer plugin
"because the plugin directory or the Windows directory may not be writable!" -- says the documentation. I simply comply with the TC-suggested rule. Anyway, I'll make it customizable.Why don't you store the EBWebView dir inside of your plugins dir ?
Re: Modern HTML viewer plugin
I support this as well.Why don't you store the EBWebView dir inside of your plugins dir ?
If you look at many plugins that needs specific files it is by default inside plugin folder or configurable. You can use suggested file for simple configuration data. In your case, it is lsplugin.ini where you can create a single section to store configuration data. This does not means that it is the best place for an a plugin internal folder. If it is a cache use %temp%. If it is persistent, the best is to use plugin folder.
All the one that use specific sccop, chocolatey,.... TC installation will have issue with folder under TC root.
Re: Modern HTML viewer plugin
2rg_software
Creating directories without the user's consent is not a good approach. I suggest to make it configurable, or at least partly configurable. My plugins prefer a settings file in their plugin directory, but they fall back to what TC provides if the former is not found.
Example: My Services2 plugin looks for %COMMMANDER_PATH%\Plugins\Services2\Services2.ini (if the plugin is installed there, of couse). If this settings file doesn't exist (which is the default), the location provided by TC - fsplugin.ini - is used. For TC installations this would be somewhere under %AppData%\Ghisler.
If you have to save more data, use a separate file in the same directory provided by TC, just like WebDAV and the SFTP plugin do for example.
Regards
Dalai
Creating directories without the user's consent is not a good approach. I suggest to make it configurable, or at least partly configurable. My plugins prefer a settings file in their plugin directory, but they fall back to what TC provides if the former is not found.
Example: My Services2 plugin looks for %COMMMANDER_PATH%\Plugins\Services2\Services2.ini (if the plugin is installed there, of couse). If this settings file doesn't exist (which is the default), the location provided by TC - fsplugin.ini - is used. For TC installations this would be somewhere under %AppData%\Ghisler.
If you have to save more data, use a separate file in the same directory provided by TC, just like WebDAV and the SFTP plugin do for example.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Re: Modern HTML viewer plugin
2rg_software
I noticed that the plugin does not show images or play sound-clips or show iframe content, if the content file is not in the same folder or a subfolder to the .htm file (on local harddisk). If the images are in a parent dir or a subdir to the parent dir, the images can not be found.
It seems that the plugin sets the current dir to http://local.example/ which is very peculiar - first of all the protocol should not be http:// but file:/// - that results javascript that takes action according to the protocol are fooled.
I noticed that the plugin does not show images or play sound-clips or show iframe content, if the content file is not in the same folder or a subfolder to the .htm file (on local harddisk). If the images are in a parent dir or a subdir to the parent dir, the images can not be found.
It seems that the plugin sets the current dir to http://local.example/ which is very peculiar - first of all the protocol should not be http:// but file:/// - that results javascript that takes action according to the protocol are fooled.
License #524 (1994)
Danish Total Commander Translator
TC 11.51rc2 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1390a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51rc2 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1390a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
- rg_software
- Member
- Posts: 121
- Joined: 2009-08-06, 12:59 UTC
- Location: Aizu-Wakamatsu, Japan
Re: Modern HTML viewer plugin
Yes, true, and related to your next point.if the content file is not in the same folder or a subfolder to the .htm file (on local harddisk)
In Edge, file:/// protocol is severely restricted in terms of security: many things do not work with it, and the recommended way to proceed is to emulate a web server by binding a specific folder to a fake web address (you can do it with WebView2), hence http://local.example.which is very peculiar - first of all the protocol should not be http:// but file:///
Thus, I need to choose something as a root. Maybe I should bind local.example to the disk root, then relative links to parent folders would work.
Re: Modern HTML viewer plugin
Actually the links to the media in my pages are full links, but they are generated according to the protocol and the location of the .htm filelocal.example to the disk root, then relative links to parent folders would work.
That explains how the plugin can show popup windows with local content, which usually requires that the (cromium) browser is started with the parameters --allow-file-access-from-files --disable-popup-blocking --edge-kiosk-type=public-browsingand the recommended way to proceed is to emulate a web server by binding a specific folder to a fake web address
License #524 (1994)
Danish Total Commander Translator
TC 11.51rc2 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1390a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.51rc2 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1390a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Re: Modern HTML viewer plugin
Windows 10 Version 22H2 (Build 19045.2130) (64-Bit)
Edge Version 107.0.1418.35 (Offizielles Build) (64-Bit)
Total Commander Version 10.52 (32-Bit)
HTMLView works fine while EdgeViewer.wlx crashes -> https://imgur.com/a/NZtDuSK
How to patch EdgeViewer.wlx64 to have both wlx-files in the same folder:
Edge Version 107.0.1418.35 (Offizielles Build) (64-Bit)
Total Commander Version 10.52 (32-Bit)
HTMLView works fine while EdgeViewer.wlx crashes -> https://imgur.com/a/NZtDuSK
How to patch EdgeViewer.wlx64 to have both wlx-files in the same folder:
Code: Select all
EdgeViewer.wlx64 (v1.0 / size 991744 b)
Address: Old byte New byte
E49B8 65 36
E49B9 72 34
Difference: WebView2Loader.dll -> WebView2Load64.dll
Last edited by Sir_SiLvA on 2022-11-07, 01:02 UTC, edited 1 time in total.
Hoecker sie sind raus!
Re: Modern HTML viewer plugin
Are you sure?How to patch EdgeViewer.wlx64 to have both wlx-files in the same folder:
[img]https://i.ibb.co/hFWKLLW/2022-11-06-135006.png[/img]
Here I am exactly on the first mentioned position: offset 0xE4908. And I see byte 57 not your 65.
Maybe you can upload to somewhere ALREADEY pre-patched file?
P.S. I think I found your patch - offset 0xE49B8H
[img]https://i.ibb.co/26gqjck/2022-11-06-135510.png[/img]
#146217 personal license