Open HTML files in the default HTML editor
From: James
Sent: Monday, June 27, 2011 9:43
Subject: [supermemo] Re: SuperMemo 2008's and the default HTML editor.
Question:
I'm running Windows 7 Ultimate 64-bit and Internet Explorer 9.
Whenever I press Ctrl+F9 with an HTML component selected, I expect the file associated with it to open in my default HTML editor - but it doesn't. Instead, it just opens the component in Internet Explorer, as though it were a web page.
I've made sure my HTML editor is selected as default in Internet Explorer's options, and even checked in the system registry. Everything checks out ok, and yet it only ever opens the component in IE9!
Answer:
When you press Ctrl+F9 in SuperMemo, the program does not use the setting specified in Internet Explorer : Tools : Internet Options : Programs : HTML editing : HTML editor but the file association for the Edit command for a given file extension (.htm in your case). These two are not the same.
Such an association could have easily been changed in Windows XP via the My computer : Tools : Folder Options... : File types tab. However, this functionality has been removed from subsequent versions of the operating system.
User-friendly solution
There is a free collection of productivity tools for the Windows OS called Create Element Power Tools. It features the File Type Doctor tool that will make it easy for you to edit the current file type associations, including the one reused by SuperMemo.
To change the program associated with the Edit command:
- Start the Creative Element Power Tools control panel
- Scroll down to Edit file type associations, check it, and click Accept
- Click the Start File Type Doctor now link below
- In File Type Doctor, scroll down to the .htm extension, and select it
- In the right pane, in the Actions in right-click menu option group, select Edit, and click the Edit button below
- In the Edit Action dialog box, use the Browse button to choose the application to carry out this action
- In the next field, enclose %1 in the quotation marks, and press Accept
- The website is not working currently, an alternative is at http://defaultprogramseditor.com/
Windows Registry solution
If you are an advanced Windows user comfortable with editing Windows Registry:
- In Registry Editor, go to the following key HKEY_CLASSES_ROOT\htmlfile\shell\Edit\command
- In the right pane, double-click the (Default) value name to start editing it
- In the Edit String dialog box, type the full path to the HTML editor you want to use, and follow it "%1" (including the quotation marks) to pass it the name of an HTML file. For example, "C:\Program Files (x86)\Cream Software\Pajaczek 5 NxG\Pajaczek.exe" "%1"
Windows 8
comments
Sanjeev wrote:
The registry change still works in SuperMemo but not in Internet Explorer 9.
Last time it worked I had windows 7, internet explorer 8
This time it failed with these: Windows 7 32 bit, Internet explorer 9
I was using this screen: -> Internet Explorer -> Tools -> Internet Options
-> Programs (tab) -> HTML editing (drop down box)
to change editors between emacs and visual studio express
This does not work any more: when I use regedit to add emacs or visual studio the choice of programs in the drop down box does not change.
BUT after the registry change Supermemo does use emacs (even if Internet Explorer doesn't even see the option at all)