HandCoder

Advanced HTML source editing, Tidy and ASP/JSP/PHP support for Nvu and KompoZer.


Features

HandCoder

Advanced HTML source edition

  • link Nvu to your favorite text editor: ConTEXT, PSPad, SciTE, Vim, Emacs...
  • HandCoder watches for file modifications, so you can edit your pages in WYSIWYG and text mode simultaneously
Tidy

Nvu output » <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
<html>
<head>

  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">

  <title>test</title>
</head>

<body>

<div id="top">
<p>This is an example page.</p>
</div>

<div id="page">
<ol>

  <li>first item</li>

  <li>second item</li>

  <li>third item</li>

</ol>
</div>

<div id="footer">
<p>This is why I've developped HandCoder!</p>
</div>

</body>
</html>

Tidy output » <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
    <title>
      test
    </title>
  </head>
  <body>
    <div id="top">
      <p>
        This is an example page.
      </p>
    </div>
    <div id="page">
      <ol>
        <li>
          first item
        </li>
        <li>
          second item
        </li>
        <li>
          third item
        </li>
      </ol>
    </div>
    <div id="footer">
      <p>
        This is why I've developped HandCoder!
      </p>
    </div>
  </body>
</html>

Auto-reformat HTML code

  • let html Tidy properly indent and cleanup your code
  • replace <br /> by CR/LF in your <pre> nodes
  • replace local URLs (file:///) by relative URLs in your document
tag-asp.gif tag-jsp.gif tag-php.gif

Better ASP/JSP/PHP support

  • WYSIWYG edition of HTML fragments (Nvu won't add headers)
  • able to keep a prolog before the DOCTYPE
  • open *.php files on Linux, resizable "Insert PHP code" window, and other small corrections ;-)
  • (experimental): ASP/JSP tag support (still in progress)

Nota:


Installation

As far as I know, Nvu doesn't properly support localized extensions; it might be possible with future versions of Nvu, but for now, you have to choose a language-specific version of this extension.

en-US fr-FR de-DE

To install on Nvu:

Do not install this extension on Firefox!


Changelog


Roadmap


FAQ

Why does Nvu change my markup?

Nvu is a wysiwyg HTML editor, not a text editor; it will change your markup, you will lose your code identation, line wrap prefs, etc. But :

The best you can do is to add Tidy in launchy.xml as an editor; this way you can launch Tidy on the current page with the "HTML Source" button. The code layout will probably be better than what you could ever do "by hand".

A better integration of Tidy would be better, with charset and document type detection, an option box to specify other prefs (indentation, line wrap...), etc. Maybe sometime.

Why does Nvu corrupt my PHP code?

Because it changes your markup.

Nvu can't edit a non-HTML file; it supports PHP if:

  • there is no PHP code outside the <html>...</html> document
  • all PHP code is embedded in <?php ?> tags (short tags like <?...?> and <%...%> are not supported)

I'm working on a workaround for these two points; Hand Coder v0.4.x might add such icons to Nvu's editor window teasing teasing ;-)

Note: Nvu versions < 1.0 of Nvu reformat all HTML attributes, which means you can use neither <?php $variable ?> nor {variable} as attributes values.

Is it possible to use Nvu to publish a PHP script on a web server?

No, if Nvu opens a PHP script it will probably corrupt it (see above).
I still use FileZilla for all publication tasks.

It would be nice to have a "publish" option in the site manager context menu, to publish a file without opening it in Nvu (simple FTP transfer)... maybe in a coming version, since I intend to implement a "DW-style FTP sync" item.

Meanwhile, the best is to use an FTP sync software. FTPsync.pl seems interesting but I hate don't know anything about Perl.

How can I preview a PHP page from Nvu?

The "HTML Preview" button opens a web browser with an address like file://C:/[...]/mypage.html or ftp://mysite/mypage.html, and PHP code will not be interprated by the web server.

Use the site manager context menu to open any PHP, ASP, JSP or HTML page with the web server address, like http://mysite/mypage.html (requires a correct http address in the site options).

Free Counter last update:
2005-08-31