Community
    • Login

    how to preview the html file

    Scheduled Pinned Locked Moved General Discussion
    11 Posts 8 Posters 52.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • rich engleR
      rich engle
      last edited by

      is there a way to quickly preview what the html code would look like as a web page?

      PeterJonesP 1 Reply Last reply Reply Quote 0
      • PeterJonesP
        PeterJones @rich engle
        last edited by PeterJones

        @rich-engle ,

        There’s a plugin called Preview HTML, which should do what you want – it creates a new panel in Notepad++ that will show a rendered view of the current HTML document. (Note that the preview window is not a full web browser; don’t expect javascript to run, and don’t expect to be able to browse/navigate your whole website through the preview window; it’s just the current document). When you make a change and save the HTML file, you can hit refresh on that preview window.

        Alternately, you can just use Notepad++'s built-in View > View Current File in … submenu, and choose to load your HTML file in Chrome, Edge, Firefox, or (shudder) IE. This will just tell your chosen browser to use the file://… URL to the file you are editing. When you make a change and save the HTML file in Notepad++, you can then use your browser’s refresh to refresh it.

        artie-finkelsteinA Diego AcostaD 2 Replies Last reply Reply Quote 4
        • artie-finkelsteinA
          artie-finkelstein @PeterJones
          last edited by

          @peterjones

          There’s also the tab context menu option to Open in Default Viewer for folks that don’t use any of the pre-configured browsers.

          1 Reply Last reply Reply Quote 3
          • Diego AcostaD
            Diego Acosta @PeterJones
            last edited by

            @PeterJones Thank you! Thank you! Thank you!

            1 Reply Last reply Reply Quote 0
            • Coolcreep 1465C
              Coolcreep 1465
              last edited by Coolcreep 1465

              I’ve followed the View > View Current file in steps method but it only opens the raw code, not the formatted type of stuff I have if I open it from the regular notepad app, so I know it’s not a problem with my code. (If it is a problem with my code, it’s because I didn’t format it to Notepad++ or something like that) Does anyone have any idea how to solve this problem?

              PeterJonesP 1 Reply Last reply Reply Quote 0
              • PeterJonesP
                PeterJones @Coolcreep 1465
                last edited by

                @Coolcreep-1465 said in how to preview the html file:

                View > View Current file in steps method but it only opens the raw code,

                My guess is that you didn’t name your file blah.html (or blah.asp or blah.php or whatever other web format you are using), so the browser treats it as plain text.

                But also remember that view current file in opens the source in the browser; there is no server… so if you expect the server to run some code to generate your HTML, that’s not going to happen.

                Coolcreep 1465C 1 Reply Last reply Reply Quote 0
                • Coolcreep 1465C
                  Coolcreep 1465 @PeterJones
                  last edited by

                  @PeterJones thanks, I’m only barley starting to learn this stuff, so any help is much appreciated. sorry if I asked a pointless question in your eyes.

                  Coolcreep 1465C 1 Reply Last reply Reply Quote 0
                  • Coolcreep 1465C
                    Coolcreep 1465 @Coolcreep 1465
                    last edited by Coolcreep 1465

                    This post is deleted!
                    1 Reply Last reply Reply Quote 0
                    • Alan KilbornA
                      Alan Kilborn
                      last edited by Alan Kilborn

                      Also note that for this to work you have to have an actual file – no folks, something like new 4, even if you’ve set its Language to html, isn’t going to cut it. Hit the actual Save on it, give it a real name (ending in e.g. .html) on your disk.

                      Rue the day when Don introduced this “new X” concept (and making it worse: with auto-remembering these “files” over runs of N++). What seemed like a good idea in 2003…hmmm.

                      1 Reply Last reply Reply Quote 1
                      • Babies getawayB
                        Babies getaway
                        last edited by

                        This post is deleted!
                        1 Reply Last reply Reply Quote -3
                        • Ramsha AfzalR
                          Ramsha Afzal
                          last edited by

                          This post is deleted!
                          1 Reply Last reply Reply Quote -1
                          • First post
                            Last post
                          The Community of users of the Notepad++ text editor.
                          Powered by NodeBB | Contributors