Problem with editing xhtml,html files


I have recenlty installed IntelliJ on my computer and it seems to be really powerful IDE!  
I create my XHTML file in this way :
New -->HTML file --> in dialog I fiil "Name" text field and "Kind" is selected to "XHTML file". As a result I get this but with icon of html file.:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="" xml:lang="en" lang="en">


Main problem is that after creating xhtml file in this way I can't simply take new row pressing 'Enter' key. I can only change cdata in given elements but only in a single row because pressing 'Enter' doesn't work. Also code-completion doesn't work!!!  I want to have on my page element like <h:inputText>, <h:outputFormat>, <f:facet>,<h:dataTable>

If I create file this way: New --->JavaEE Web Page -->Facelets page I have these libraries declared but I am unable to move to new row. 'Enter' still doesn't work as well as code-completion!!!
<html xmlns=""

If I create xhtml in this way : New -->File -->'myname' -->next in dialog "Register  New File Type Association" I select "XHTML files"
As a result I get completely empty file with no extension at all.
Comment actions Permalink

Sounds like
Please try File -> Invalidate Caches. Does it help?

Comment actions Permalink

Hi volodia,

If I create xhtml in this way : New -->File -->'myname' -->next in dialog "Register  New File Type Association" I select "XHTML files"
As a result I get completely empty file with no extension at all.

When creating new file this way (New | File), you should type FULL file name including extension (e.g. myname.html). If you do not type any extension, IDE will ask you how to treat such extension-less file (the "Register New File Type Association" dialog).

I suggest go to "Settings | File Types" and check (better even delete) those newly created entries (e.g. "myname").

As for the actual problem -- cannot say for sure why Enter key does not work for you. The first thing I would check -- 3rd party (not-bundled) plugins -- please disable all of such plugins and try again. Restarting computer may also help (especially if you are on Windows :) ). Other things I would check -- 3) Check error.log (Help | Reveal log in ...); 4) "File | Invalidate caches..." and maybe even 5) delete ALL IDE-settings (back them up first, of course) to see if this may help (folder locations are described here: )

Comment actions Permalink

Your answer is really helpful!!!

After I invalidated caches and disabled all plugings at  File -->Other Settings -->Configure Plugins my IntelliJ got like new. Now it opens for second.
I am able to see code-completion and take new row in pom.xml and create xhtml file with appropriate icon

Unfortunately there is still one problem. How to get html elements with prefix h
When I open existent xhtml file I see in red this string:


Pointing mouse at error I read  "Resource registered by this uri is not recognized  (Settings|Progect Settings|Schemas and DTDs)"

In window external Shemas and DTDs I have this url included (false is because checkbox isn't selected) false false false false false

Maybe you now what to do?
Thank you!
Comment actions Permalink


I'm not a Java guy so do not know for sure how it works in actual IntelliJ IDEA (I'm a PhpStorm user and have never dealt with xmlns:h=""). I would assume pressing Alt+Enter (while standing there, on error locations, in editor) and looking at the available options may have an answer (maybe "Fetch remote resource" will do the job, dunno).


Please sign in to leave a comment.