EdgeViewer - Modern HTML viewer plugin

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
rg_software
Member
Member
Posts: 113
Joined: 2009-08-06, 12:59 UTC
Location: Aizu-Wakamatsu, Japan

Re: Modern HTML viewer plugin

Post by *rg_software »

Does it work on XP?
Sorry, no chance. The minimal requirement for Edge is Win 7 AFAIK.
User avatar
MaxX
Power Member
Power Member
Posts: 1024
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: Modern HTML viewer plugin

Post by *MaxX »

Ok, that is logical.
Does the plugin use any Edge's ''User Data'' folders? Any disk cache writes or anything else?
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Modern HTML viewer plugin

Post by *petermad »

Any disk cache writes or anything else?
It creates a EBWebView folder - location configurable with UserDir= parameter (default is in the plugin directory)

Notice that The Cloud filesystem plugin also makes a EBWebView folder if configured to use the OauthBrowser2 for login.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MaxX
Power Member
Power Member
Posts: 1024
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: Modern HTML viewer plugin

Post by *MaxX »

petermad wrote: 2023-06-07, 17:00 UTC
Any disk cache writes or anything else?
It creates a EBWebView folder - location configurable with UserDir= parameter (default is in the plugin directory)
Looks like something wrong.
It made it in "C:\Users\User\EBWebView\" folder.
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
MaxX
Power Member
Power Member
Posts: 1024
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: Modern HTML viewer plugin

Post by *MaxX »

Ah, I see it.
The line
UserDir=%USERPROFILE%
in edgeviewer.ini...

Ok. Also some questions:
1. How can I find an option to autodelete EBWebView folder on exit?
2. How can I force offline mode?
3. How can I view html files with .php extension? I have already written "HTML=HTM,HTML,XML,PHP" in edgeviewer.ini, but edge still shows it as plain text.
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
MaxX
Power Member
Power Member
Posts: 1024
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: Modern HTML viewer plugin

Post by *MaxX »

Also found that plugin does not create _detect string in wincmd.ini, so the webview2 threads are started each time you press F3 on anything.
Must be:
*_detect="EXT="HTM"|EXT="HTML"|EXT="XML"|EXT="MD"|EXT="MARKDOWN"|EXT="ADOC"|EXT="ASCIIDOC""
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
rg_software
Member
Member
Posts: 113
Joined: 2009-08-06, 12:59 UTC
Location: Aizu-Wakamatsu, Japan

Re: Modern HTML viewer plugin

Post by *rg_software »

Again sorry for slow responses -- I will eventually collect the requests and do something about them. Some quick answers for now:

1) If "autodelete" option is really necessary, I can make it.
2) What do you mean by "offline" mode? Prohibit the system to access the internet? No idea, can look into it if this is important.
3) I am still battling with the idea of making (or not) the detect string. There are some issues about it, the most obvious one is that I can't list the "directory" type in the detect string. Some folks want to use EdgeViewer to preview folders, which means I shouldn't rely on the detect string.
User avatar
deus-ex
Power Member
Power Member
Posts: 969
Joined: 2003-02-10, 17:45 UTC

Re: Modern HTML viewer plugin

Post by *deus-ex »

2rg_software

Thank you for your ongoing interest in trying to support our preferences with your HTML viewer plugin.

rg_software wrote: 2023-06-08, 04:34 UTC 3) I am still battling with the idea of making (or not) the detect string. There are some issues about it, the most obvious one is that I can't list the "directory" type in the detect string. Some folks want to use EdgeViewer to preview folders, which means I shouldn't rely on the detect string.
HTMLView supports Total Commander's detection string and offers an INI file for adjustment of further plugin settings, like enabling to view directories in quick view mode. See the examples below of my current setup. As you can see I'm using a different plugin to view HTML files, and HTMLView is solely used for quick viewing of directories.

wincmd.ini:

Code: Select all

[ListerPlugins]
4=%commander_path%\wlx\slister\slister.wlx64
4_detect="ext="HTM"|ext="HTML"|ext="PDF"|ext="SVG""
5=%commander_path%\wlx\htmlview\htmlview.wlx64
5_detect="!(ext="XML")"

htmlview.ini:

Code: Select all

[options]
; set to 1 to enable directory display in Quick View mode
ShowDirs=1
User avatar
MaxX
Power Member
Power Member
Posts: 1024
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: Modern HTML viewer plugin

Post by *MaxX »

2rg_software
No problem with responses.
1. Yes, please.
2. Just view only local files without any requests to web. If possible.
3. I think, let it be just the same like in htmlview.
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
rg_software
Member
Member
Posts: 113
Joined: 2009-08-06, 12:59 UTC
Location: Aizu-Wakamatsu, Japan

Re: Modern HTML viewer plugin

Post by *rg_software »

HTMLView supports Total Commander's detection string and offers an INI file for adjustment of further plugin settings
I remember having a talk like this before, but I am not sure how it is supposed to work.

My understanding is that if you provide a detect string, the plugin won't be called for anything not matched there. So if a detect string looks like EXT="HTML", then opening a directory won't call the plugin at all, so in effect it is not possible to list a directory type there. My guess that in your case !(ext="XML") will match a directory. If this is true, then supporting a detect string would mean that a directory is viewable only if NOT operation is used.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Modern HTML viewer plugin

Post by *Horst.Epp »

I used HTMLview since a long time, with an empty detection string.
The plugins ini file controls what and how extensions are diplayed and other aspects of the plugin.
The nice function for dirs (if enabled in the ini) is that dir contents are displayed as thumbnails
in Quick View and for F3.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
rg_software
Member
Member
Posts: 113
Joined: 2009-08-06, 12:59 UTC
Location: Aizu-Wakamatsu, Japan

Re: Modern HTML viewer plugin

Post by *rg_software »

I used HTMLview since a long time, with an empty detection string.
It was and still is my intention to replicate this approach. It is my understanding that the only real purpose of a detect string is optimization: you don't have to load a plugin DLL if the string says this plugin isn't needed. However, I doubt it worth the effort at our time (especially if you consider loading the whole Chromium engine). If I use the ini file only, I can be more flexible with types, including directories.
User avatar
deus-ex
Power Member
Power Member
Posts: 969
Joined: 2003-02-10, 17:45 UTC

Re: Modern HTML viewer plugin

Post by *deus-ex »

rg_software wrote: 2023-06-08, 15:24 UTCMy understanding is that if you provide a detect string, the plugin won't be called for anything not matched there.
Yes, that's correct. And a plugin won't be called for every defined exclusion string, for example: 1_detect="!(ext="TXT")"
rg_software wrote: 2023-06-08, 15:24 UTCSo if a detect string looks like EXT="HTML", then opening a directory won't call the plugin at all, so in effect it is not possible to list a directory type there.
The syntax of the detect string does not support defining the value "directory" in particular. It is a special case of the quick view event, where Total Commander passes the string "directory path" to the lister plugins, asking whether the plugin can handle the provided value. HTMLView plugin answers this request positively if its INI flag "ShowDirs" is set to 1.
rg_software wrote: 2023-06-08, 15:24 UTCMy guess that in your case !(ext="XML") will match a directory.
No, that's not correct. I use that string solely to ensure that HTMLView is not called for the file extension ".XML", but it is not required for its function "quick view of directories" to actually work.

I could also disable HTMLView's support for XML files by removing the extension from the plugin's INI flag "HTMLExtensions=", thus not requiring the wincmd.ini detection string for HTMLView at all. But then HTMLViewer would be triggered for XML files just to report back that it doesn't support the file extension ".XML" every time.

Additionally, having the ".XML" exclusion string in wincmd.ini helps not to forget that there is an exclusion actively set.
User avatar
MaxX
Power Member
Power Member
Posts: 1024
Joined: 2012-03-23, 18:15 UTC
Location: UA

Re: Modern HTML viewer plugin

Post by *MaxX »

2rg_software
I found the folder "EBWebView" here
C:\Users\<User>\AppData\Local\Packages\MicrosoftWindows.Client.WebExperience_cw5n1h2txyewy\LocalState\EBWebView\
Looks like the WebView2 engine uses the same folder name.
1. Can I safely use it in plugin?
2. How can I set this path once for each user?
3. Will it work?
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Modern HTML viewer plugin

Post by *petermad »

2. How can I set this path once for each user?
%USERPROFILE%\AppData\Local\Packages\MicrosoftWindows.Client.WebExperience_cw5n1h2txyewy\LocalState\EBWebView\
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply