facebook

HTML document format – indenting

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #221923 Reply

    Ben Eng
    Member

    The document formatting seems to be behaving a little weird.

    A <td><table>…</table></td> construct is formatted so that the <td> start tag is indented at the same level as the nested <table>. Similarly, when a <table> is nested in a <form>, the same thing happens. I’m not sure if this happens no matter where <table> is nested. I would like it indented as a child, wherever it is a child.

    In addition, I cannot find how to control the indent size. It seems to be indenting using a tab or 4 spaces, which happens to be the indent size for my Java source code. I would like my HTML and XML documents to indent with 1 space at each level in the document hierarchy. Is there a preference setting to control this?

    Ben

    #221930 Reply

    Greg
    Member

    I’m not sure if this happens no matter where <table> is nested. I would like it indented as a child, wherever it is a child.

    In the HTML formattter, the <table> element does not indent from its parent as you have noted. This is a not a configuraiton problem but a current limiration of the formatter. We are investigating ways to improve the formatter for future versions.

    I would like my HTML and XML documents to indent with 1 space at each level in the document hierarchy. Is there a preference setting to control this?

    Yes, if you right click in the html editor and choose “Preferences” under the “Common Editor Preferences” you can set the tab width 1. Then you can reformat the document and it will be formatted to your liking. The drawback is that whatever setting you set for “Common Editor Preferences” controls all MyEclipse editors as well. So currently there is no way to set indent size for HTML to be different than that for XML files.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: HTML document format – indenting

You must be logged in to post in the forum log in