Html file 'Open in browser' popup not showing up

Hi, i haven't used this feature since version 11 or so. I have a regular java spring project with 'main/resources/static'.  Before it was that i simply right click on any *.html file -> Preview in browser -> Chrome and it will spin up some internal web server and open it in chrome with some http://localhost:6345/testfolder/test.html easy.

Now this feature seems to completely gone, i have tried to setup all sorts of deployment configurations (all of them) with mappings. Installed php plugin, setup interpreter, and did all possible dance i could find in documentation, nothing. The thing is i don't want to be able to preview those files on my Tomcat/Jetty instance, i will have to open security routes, and if deployed those '/testfolder/test.html' will be open to public.

Is this feature gone or i have setup something wrong.

Thank you.

2

Please select your .html file in Project tool window, hit `Ctrl+Q` (or whatever shortcut is assigned to View | Quick Documentation main menu action) and attach a screenshot of the popup that opens

2

Awesome, it showed that my *.html file types assigned as Handlebars/Mustache templates. I switched to HTML and it worked fine. Thanks.

2

I am having a similar same issue, I cannot get 'open in browser' to appear as an option in any menu, nor do I get the floating browser icons when editing html files. When I do 'CTRL + Q' on a html file I get Type: HTML (Angular HTML Template)

Is this whats causing me the problem? I checked in Editor/File Types and see that 'Angular HTML Template' has 'Angular HTML Template' as it's registered pattern, which looks weird (I have the same thing with 'Dockerfile'). Removing the registered pattern does nothing and it reappears the next time I view File Types.

0

Update: If I remove the AngularJS plugin from Webstorm then I get the 'open in browser' options. Is there a way I can have both the AngularJS plugin and ability to open html files in browser?

0

Open in browser action is not available for Angular projects (https://youtrack.jetbrains.com/issue/WEB-35128). It's fixed in 2018.3.4

0

Before creating a new issue.. this seems relevant to me. I do not see the browser actions icons. Have html plugin available, I got a type characterization from some menu .. it says html(jinja2). Seeing a post above, does jinja2 somehow disable the browser action icons?

Thanks, Lourens 

0

jinja2 templates can't be natively executed by the browser, the pre-processing is required, that's why the HTML preview is not enabled for them.

0

Thanks for the prompt answer. Just to be sure, that implies that I cannot preview any html file (even outside template directory, having nothing to do with templates?). I just realize I can simply open html files from the terminal or make a separate run configuration so not too problematical.

0

If the .html file is treated as a jinja2 template, it can't be previewed :(

0

请先登录再写评论。