Preview .mht file

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
binocular222
Posts: 1424
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Preview .mht file

Post by binocular222 »

I tried save a webpage as .mht then open with IE → IE can display correctly.
However, XYplorer preview pane show raw code such as:

Code: Select all

From: <Saved by Maxthon>
Subject: Ghi nhanh v? vi?c b?t gi? ?ng Tr??ng Duy Nh?t ? Cavenui
Date: Thu, 5 Jun 2013 21:01:37 +0700
MIME-Version: 1.0
Content-Type: multipart/related;
     type="text/html";
     boundary="----=_NextPart_000_607E_EB34AFDB.5F257E18"

------=_NextPart_000_607E_EB34AFDB.5F257E18
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
Content-Location: http://cavenui.wordpress.com/2013/05/27/ghi-nhanh-ve-viec-bat-giu-ong-truong-duy-nhat/
Is it normal? What should I do to preview it correctly?
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

admin
Site Admin
Posts: 67247
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Preview .mht file

Post by admin »

Did you enable MHT in Previewed Formats?

binocular222
Posts: 1424
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: Preview .mht file

Post by binocular222 »

I enabled .mht in previewed format.
I notice that preview tab display the same as Raw View
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

admin
Site Admin
Posts: 67247
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Preview .mht file

Post by admin »

Strange, it works fine here. :|

binocular222
Posts: 1424
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: Preview .mht file

Post by binocular222 »

Yeah, run E:\7Utilities\XYplorer\XYplorer.exe /fresh
and it preview correctly.
Agrhh, which amongst hundreds of settings? I feel the need for user.ini more now.
--------------------
Oh, found it.
I have to exclude .mht from preview. So strange!
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

TheQwerty
Posts: 4373
Joined: 03 Aug 2007 22:30

Re: Preview .mht file

Post by TheQwerty »

For those that are feeling a little lost as to why the solution is seemingly: in order to preview mht one must first exclude mht from preview.


To my understanding there are only 7 true ways that XY can preview a file.
  1. Text View
  2. Web Browser (Plugin)
  3. Custom Font View
  4. Image View
  5. Audio / Video View
  6. Shell view with 'PreviewShellIfNoneBetter' tweak enabled.
  7. Raw view with 'PreviewRawIfNoneBetter' tweak enabled.
To determine which to use XY looks for the file's extension within the categories shown under the Configuration's Preview Formats page, and uses the first enabled match - falling back to the tweaks if none is found.

Therefore to enable the web view of an mht file you have to do two things:
  1. Add/Enable the mht type in the Web & Office Files category
  2. Remove/Disable the mht type in the Text Files category.

More generally to enable a specific type of preview for a file type make sure you also disable it in any of the previous (above) categories.

binocular222
Posts: 1424
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: Preview .mht file

Post by binocular222 »

Oh, understand.
I enabled the tweak "'PreviewShellIfNoneBetter",
so, when I exclude .mth from preview, XYplorer fall back to using Windows' Shell Preview Handler.
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

admin
Site Admin
Posts: 67247
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Preview .mht file

Post by admin »

A couple of file types are by factory default featured in two categories (in Previewed Formats) since there are two useful ways to preview them. HTM(L) and MHT are among those file types, since you might either view them as HTML code (category "Text") or interpreted as website (category "Web & Office").

binocular222
Posts: 1424
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: Preview .mht file

Post by binocular222 »

admin wrote:A couple of file types are by factory default featured in two categories (in Previewed Formats) since there are two useful ways to preview them. HTM(L) and MHT are among those file types, since you might either view them as HTML code (category "Text") or interpreted as website (category "Web & Office").
Totally true!
I disabled .mht in Text but enabled it in Web & Office.
This is the first time I realize 1 extension can appear in 2 categories!
Thanks
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

Post Reply