@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.