1. PHP

Paste your raw PHP code into the pane (including any <?php ... ?> tags), and click "Convert to HTML".

Hello, first-time user!

It looks like this is your first time using Documentor. Be sure to check out

  • the Tips, to see how to best comment your code for automatic documentation
  • the Options, where you can customize the input and output of both your PHP and HTML
  • the Sample Code, which lets you see at a click what Documentor can do

To see the results of changes as you make them, ensure the "Preview" option below is selected, with "Auto-update on changes" checked. Click here to make that happen.

Close

Input

Output

  • All

  • Methods

  • Properties

    • Group by:

Options

  • Markup

  • Re-writing

  • Flavour

  • Previewing

    • New HTML:
 

Tips

Commenting your code

Methods are documented automatically by using standard JavaDoc block comments. Try to include as much information as possible in the source code. The first block (delimited by a double-return) will appear as the method title in italics, whilst subsequent blocks will appear below as normal paragraph text.

Properties are commented by using inline comments. Any comments on the line before will be treated as comment titles, allowing you to group your comments into blocks. Any comments made after the property, on the same line will be treated as property descriptions.

Customize your HTML

Use the Options to generate more / less / relevant code. Your choices are saved between sessions.

Previews on Firefox

If on Firefox the Preview window annoyingly opens in a new tab rather than a window, type about:config into the URL bar, navigate to browser.link.open_newwindow and set the value to 2. This will allow popup windows to open as normal windows.

Sample code

Try the following code samples to see how the options affect HTML output:

2. HTML

Paste your HTML into the pane, and click "Convert to Wiki".

Input

  • HTML

Output

  • Wiki

 

Tips

Writing better documentation

If only having just converted from PHP, you are encouraged to copy and paste the HTML to an editor to create more complete documentation than just method listings. Try to include practical code samples as as well as theoretical information.

Kohana Projects template CSS

The HTML generated here starts with a #content div with a class of .wiki, which lets the Kohana Projects CSS do its thing. If you paste in your own HTML without and forget these ids/classes, the CSS will fail. Just so you know.

HTML and Redmine

Don't be afraid of getting creative with the HTML,if in doubt check this page to see what will convert.

Documentor will happily convert and create Redmine wiki links, just make sure they are in one these formats:

  • another page: href="PageName"
  • an item on another page: href="PageName#Heading text as it reads"
  • an item on the same page: href="#Heading text as it reads"

The generated links will show something like [[PageName#Heading-text-as-it-reads|Your link text]].

To set the page name, edit the field in Options.

 

3. Wiki

This is your final Wiki code. Copy and paste to your Redmine Wiki, and you're done.