• Login
Community
  • Login

Displaying an image as the background of a webpage

Scheduled Pinned Locked Moved General Discussion
5 Posts 3 Posters 5.9k 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.
  • K
    Ku Qiu
    last edited by Feb 16, 2023, 3:26 PM

    Hi there,

    I am new to NPP.

    I have an image which I would like to use it as the background image for a webpage.

    This image is in the folder named 'Notepad++".

    3.png

    However it didn’t show in the ‘document list’. I am wondering whether ‘document list’ is the wrong thing to do. How can I have a navigation pane on the left in the editor so that I can put all the files needed in the so called ‘current folder’ that NPP can display this image as the background without going to find this image with a specific path.
    2.png

    A P 3 Replies Last reply Feb 16, 2023, 3:29 PM Reply Quote 0
    • A
      Alan Kilborn @Ku Qiu
      last edited by Feb 16, 2023, 3:29 PM

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • A
        Alan Kilborn @Ku Qiu
        last edited by Alan Kilborn Feb 16, 2023, 3:32 PM Feb 16, 2023, 3:31 PM

        @Ku-Qiu said in Displaying an image as the background of a webpage:

        it didn’t show in the ‘document list’

        It would only show in the Document List if you open the Icon.jpg file into a Notepad++ tab. And that’s something you wouldn’t reasonably do because .jpg files are not text files and N++ is a text editor.

        The remainder of your post seems to address HTML type questions which aren’t on-topic for a discussion forum about Notepad++.

        K 1 Reply Last reply Feb 16, 2023, 3:43 PM Reply Quote 2
        • K
          Ku Qiu @Alan Kilborn
          last edited by Feb 16, 2023, 3:43 PM

          @Alan-Kilborn Thanks for your reply.

          It does seem work perfectly if I open the image file in NPP in advance.
          3.png

          But still I am not sure whether document list is the best way for my intention. I used to use Matlab. And they have a navigation pane on the left where you can put all the files you need in the ‘current folder’ so that only files in that folder can be used/run. I am just wondering whether NPP do anything in the similar fashion.

          1 Reply Last reply Reply Quote 0
          • P
            PeterJones @Ku Qiu
            last edited by Feb 16, 2023, 3:56 PM

            @Ku-Qiu said in Displaying an image as the background of a webpage:

            I am wondering whether ‘document list’ is the wrong thing to do.

            Yes, it is the wrong feature. Document List shows all the documents that are open in Notepad++. You don’t (normally) open image files in a text editor (because they aren’t text).

            But if you want the warm fuzzies of seeing a directory listing in Notepad++ that shows Icon.jpg so you can be more confident that it’s there, you could use the File > Open Folder As Workspace… (“FaW”) on the current directory, and that will give you a directory listing. Or you could View > Project Panels > Project Panel #, and create a new project in the workspace , then add that folder to the project. (But really, I think FaW is your best bet.)

            • N++ User Manual: Folder as Workspace
            • N++ User Manual: Project Panels

            that NPP can display this image as the background without going to find this image with a specific path.

            Notepad++ is a text editor. It doesn’t natively display images, and it does not natively render HTML for you. If you want to render HTML inside Notepad++, you can use the PreviewHTML plugin (available through Plugins > Plugins Admin). Or you could just use View > View Current File In > … and pick your favorite browser, which would then launch that browser with the saved version of the HTML page you are actively browsing.

            ----

            Ahh, your reply post shows that it appears that you are using PreviewHTML . You should have listed that among your assets.

            But still I am not sure whether document list is the best way for my intention

            Nope. (See above)

            I used to use Matlab.

            Using matrix math application for editing webpages? I’m confused.

            And they have a navigation pane on the left where you can put all the files you need in the ‘current folder’ so that only files in that folder can be used/run.

            Ah, maybe you were just talking about the UI concepts.

            No, you cannot limit what files your webpage will see based on what’s in some list in Notepad++. The webpage (and the HTML renderer in whatever plugin you are using) are Notepad++ agnostic: they don’t know, and don’t care, about anything that Notepad++ is doing (and it especially wouldn’t once you used a real browser to view the page, and/or published it to a webserver).

            But if you want to be able to see non-text filenames in a panel on the left, so that you can remember image filenames more easily, use the Folder As Workspace feature, not Document List.

            1 Reply Last reply Reply Quote 2
            2 out of 5
            • First post
              2/5
              Last post
            The Community of users of the Notepad++ text editor.
            Powered by NodeBB | Contributors