Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I modify the Windows 7 preview pane so HTML files display just the text in the preview instead of rendering the html?

When I click on html files in explorer the preview pane currently tries to render the html for the preview. I'd like the behavior to just show me the text without interpreting the tags. Is there a way to do this by messing with the registry or changing a setting somewhere?

like image 334
Scott Avatar asked Mar 13 '13 01:03

Scott


People also ask

How do I preview a PDF without opening it?

Open File Explorer in Windows 10, click the View tab, and select Preview pane. Click a file you wish to view, such as a Word document, Excel sheet, PowerPoint presentation, PDF, or image. The file appears in the preview pane.


2 Answers

Update: Just use the PreviewConfig utility (zip file download), which makes the required changes to the registry for you. Here is a detailed explanation of how the registry changes work.


To view HTML files as text in the preview pane use this registry patch (save with a .reg extension and double-click):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\htmlfile\shellex\{8895B1C6-B41F-4C1C-A562-0D564250836F}]
@="{1531d583-8375-4d3f-b5fb-d23bbd169f22}"

Bonus: preview any file type without a preview handler as plain text:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\*\shellex\{8895B1C6-B41F-4C1C-A562-0D564250836F}]
@="{1531d583-8375-4d3f-b5fb-d23bbd169f22}"
like image 51
Leftium Avatar answered Sep 30 '22 04:09

Leftium


Alright, I ended up figuring how to do this. What was posted above was close but not quite as that was having me edit the wrong values. The PreviewConfig utility was trying to change the wrong key as well but couldn't since it was locked. I ended up going through a long process to enable editing of the locked registry key which is when I realized that was the wrong place.

If you want to have the preview pane show plain text for HTML files instead of rendering it, open the registry editor and go to:

HKEY_CLASSES_ROOT\htmlfile\shellex\{8895B1C6-B41F-4C1C-A562-0D564250836F}

Edit the Default key and replace the value with {1531d583-8375-4d3f-b5fb-d23bbd169f22} and you should be set.

like image 43
Scott Avatar answered Sep 30 '22 03:09

Scott