psolom / RichFilemanager

An open-source file manager. Up-to-date for PHP, Java, ASHX, ASP, NodeJs & Python 3 Flask. Contributions are welcome!
http://fm.devale.pro
906 stars 251 forks source link

Open html file in browser (iframe viewer) #177

Closed FabriceBoyer closed 7 years ago

FabriceBoyer commented 7 years ago

Hi,

When I click on an html file item in RichFilemanager, I'd like it to open in the same browser. At present time, it opens a "preview" view showing only an icon.

I don't want to edit the html, just see it as if I had double clicked on it in Windows Explorer. Clicking "Back" in browser should bring me back to list of HTML files in RichFilemanager.

I tried playing with several configuration options (in filemanager.init.js, filemanager.config.json and config.php) but couldn't get anything to work. Any idea how to achieve this behaviour ?

I'm using PHP with Nginx and default RichFilemanager configuration.

Regards, Fabrice

psolom commented 7 years ago

Yeap, there is no such capability for html files at the moment. I will think about it.

FabriceBoyer commented 7 years ago

It would help a lot ! Thanks for your great work

psolom commented 7 years ago

Checkout updated master branch. I have made previewer for html/htm files via iframe, see new viewer.iframe options section in the JSON configuration file. It works in the same way (no new windows opened), but instead of preview item you will see html page loaded in iframe. As a bonus I have made html files editable by default, so now you can preview and edit html/htm files at the preview page.

NOTES: Not uploaded to the demo page. Going to release in v2.4.0

FabriceBoyer commented 7 years ago

Thanks a lot, it looks like exactly what i needed ! I'll test that as soon as I'm back from my trip, I didn't expect such a fast feedback, that's really great !

psolom commented 7 years ago

You are welcome. Looking forward for your feedback.

psolom commented 7 years ago

Released in v2.4.0 I close this issue, but still interested in your feedback. Also report if you will face any bugs, please.

FabriceBoyer commented 7 years ago

Hi,

Sorry for delayed response. I've tested your changes and it works great. Good job! Thanks again

psolom commented 7 years ago

You are welcome. Thanks for the feedback.