“view-source:” command is a browser command that can be used to view the source of a web page. Also you can view source of a web page by selecting the “view source” option in the right click context menu.
Usually the source of the web page opens in the internal editor. But if you want to , the default editor may not be suitable. One option is to copy the contents from the default editor to the web page editor of your choice. Another option is to attach an external editor so that whenever you try to view the source of the web page it will open in the external editor.
Before learning to configure external editor to view source let us check the “view-source:” command which is available on almost all browser software available in market.
“view-source:” command with Google Chrome, Firefox and IE
You can use the “view-source:” command to view the source of any web page. This command will help you to view the source code without first accessing the page itself. All the major three browsers Google Chrome, Firefox and IE offer this feature.
How to use “view-source:” command?
The following is the syntax of the “view-source:” command. Type it is the address bar and the browser will fetch the source code of the page for you.
How to Configure Firefox to View Source in External Editor?
Let us see how to configure the Firefox browser to view the source in an external editor of your choice. Follow the steps below to configure this.
- Type “about:config” in your browser address bar and it enter.
- Click the warning button “I’ll be careful, I promise”.
- In the about:config window, type the “view_source” in the filter search box.
- Double click on the “view_source.editor.external” preference name to change the value to “true”.
- Double click on the “view_source.editor.path” preference and will open a popup. Type the complete path of the editor of your choice in the text box of the window and press OK. See below.
- Now right click on any page in your browser and click “view source”. This will open the page source in the editor you configured.
Before you go, subscribe to get latest technology articles right in your mailbox!.