HTML pages view
-
Is it possible to view html pages on notepad++? I mean not the source code but the rendering of html pages like a browser ? I tried to look for this feature but I did not find it
-
This post is deleted! -
@Alessandro-Malladra said in HTML pages view:
Is it possible to view html pages on notepad++?
Natively, no. Using a plugin (HTML Preview, for example), yes, but it’s not ideal. Easiest is to View > View Current File In… and pick a real browser.
-
@Alessandro-Malladra said in HTML pages view:
Is it possible to view html pages on notepad++?
I use Ctrl+Alt-Shift+X on the keyboard. That’s the Run / Launch in Firefox command in the menus. Firefox, or any web browser, is a huge project in itself. It’s better to take advantage of that code and the hours they put into thinking about and maintaining the browser rather than attempting to emulate it within Notepad++.
-
@mkupper said in HTML pages view:
That’s the Run / Launch in Firefox command in the menus.
I believe such browser-specific commands were removed from Notepad++ a while ago?
Of course, there remains a view-in-default-browser command still existing (e.g. Notepad++ 8.5.8). -
AFAIK (as of 8.5.7, haven’t yet installed 8.5.8) the command is called “Open in Default Viewer”, and it will just use whatever your system’s default browser is for HTML documents, or your default PDF viewer for PDFs, etc.
-
@Mark-Olson said in HTML pages view:
AFAIK (as of 8.5.7, haven’t yet installed 8.5.8) the command is called “Open in Default Viewer”, and it will just use whatever your system’s default browser is for HTML documents, or your default PDF viewer for PDFs, etc.
Odd… under View | View Current File in I have:
Firefox
Chrome
Edge
IEand under Run I have:
Run… F5
Get PHP Help Alt+F1
Wikipedia Search Alt+F3
Open file in another instance Alt+F6
Modify Shortcut/Delete Command…in both v8.5.8 (64-bit) and v8.4.8 (32-bit).
Maybe those are potential customizations that don’t change when upgrading? I could have customized them at some time in the past, but I don’t remember doing so.
I do have Open in Default Viewer on the File menu.
-
@Coises said in HTML pages view:
Odd… under View | View Current File in I have:
Firefox
Chrome
Edge
IEHmm, yes, I see that as well in 8.5.8.
It appears I was mistaken about their removal.
I do remember something related to this, though. Memory fails. :-( -
To sum up:
In ages past, there were Run menu entries for the various browsers.
In that EU-FOSSA mass event in 2019, they were encouraged to remove those⁰, and replaced them with View > View Current File In… ¹ ².
Also, there is an File > Open in Default Viewer ³ action which will run the Windows default action (double-click action) for the file, if it’s a filetype that’s not associated with Notepad++.
-
@PeterJones and others
I am running 8.5.8 but apparently the
Run / Launch in Firefox Ctrl+Alt+Shift+X
that’s available to me is a legacy thing from a previous version of npp. I usually double check a portable 8.5.8’s behavior before commenting but forgot to do that earlier in the thread. My portable 8.5.5 does not haveRun / Launch in Firefox
That made me curious… It turns out the culprit, if you want to call it that, is an entry in my
shortcuts.xml
file:<UserDefinedCommands> <Command name="Launch in Firefox" Ctrl="yes" Alt="yes" Shift="yes" Key="88">firefox "$(FULL_CURRENT_PATH)"</Command> </UserDefinedCommands>
I dug further and found that up until npp v7.6.2 that the shortcuts.xml file included:
<UserDefinedCommands> <Command name="Launch in Firefox" Ctrl="yes" Alt="yes" Shift="yes" Key="88">firefox "$(FULL_CURRENT_PATH)"</Command> <Command name="Launch in IE" Ctrl="yes" Alt="yes" Shift="yes" Key="73">iexplore "$(FULL_CURRENT_PATH)"</Command> <Command name="Launch in Chrome" Ctrl="yes" Alt="yes" Shift="yes" Key="82">chrome "$(FULL_CURRENT_PATH)"</Command> <Command name="Launch in Safari" Ctrl="yes" Alt="yes" Shift="yes" Key="65">safari "$(FULL_CURRENT_PATH)"</Command> <Command name="Get PHP help" Ctrl="no" Alt="yes" Shift="no" Key="112">http://www.php.net/$(CURRENT_WORD)</Command> <Command name="Wikipedia Search" Ctrl="no" Alt="yes" Shift="no" Key="114">https://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD)</Command> <Command name="Open file in another instance" Ctrl="no" Alt="yes" Shift="no" Key="117">$(NPP_FULL_FILE_PATH) $(CURRENT_WORD) -nosession -multiInst</Command> <Command name="Send via Outlook" Ctrl="yes" Alt="yes" Shift="yes" Key="79">outlook /a "$(FULL_CURRENT_PATH)"</Command> </UserDefinedCommands>
From npp v7.6.3 to v7.9.5 much of that was commented out:
<UserDefinedCommands> <!-- The following shortcuts are dangerous if your computer is compromised. (But if your computer is compromised, EVERYTHING IS DANGEROUS!) Remove the comment and use them at your own risk!!! <Command name="Launch in Firefox" Ctrl="yes" Alt="yes" Shift="yes" Key="88">firefox "$(FULL_CURRENT_PATH)"</Command> <Command name="Launch in IE" Ctrl="yes" Alt="yes" Shift="yes" Key="73">iexplore "$(FULL_CURRENT_PATH)"</Command> <Command name="Launch in Chrome" Ctrl="yes" Alt="yes" Shift="yes" Key="82">chrome "$(FULL_CURRENT_PATH)"</Command> <Command name="Launch in Safari" Ctrl="yes" Alt="yes" Shift="yes" Key="65">safari "$(FULL_CURRENT_PATH)"</Command> <Command name="Send via Outlook" Ctrl="yes" Alt="yes" Shift="yes" Key="79">outlook /a "$(FULL_CURRENT_PATH)"</Command> --> <Command name="Get PHP help" Ctrl="no" Alt="yes" Shift="no" Key="112">http://www.php.net/$(CURRENT_WORD)</Command> <Command name="Wikipedia Search" Ctrl="no" Alt="yes" Shift="no" Key="114">https://en.wikipedia.org/wiki/Special:Search?search=$(CURRENT_WORD)</Command> <Command name="Open file in another instance" Ctrl="no" Alt="yes" Shift="no" Key="117">$(NPP_FULL_FILE_PATH) $(CURRENT_WORD) -nosession -multiInst</Command> </UserDefinedCommands>
Starting with v8.0 the commented out section was removed.