Tinderbox User's Manual : HTML View

HTML View

Tinderbox Icon

HTML VIEW

An HTML view window shows you the HTML that would be created by exporting the selected note, with the current HTML export settings. The window also provides convenient controls for changing many of these settings. The Export and Preview buttons on the window allow you to export that note to HTML with those settings, or export it and then immediately view the results in your Web browser.

You can have many HTML view windows open at once, showing different notes.

an HTML view window

Tip: you can select text in an HTML view window: hold down option while you select the text. This lets you copy the text, in case you want to inspect or test its HTML elsewhere.

HTML VIEW EXPORT CHOICES

The Exportpane of a note's HTML View window lets you control which notes are exported, choose a file name, and preview individual notes.

Export as page

If this box is checked, this note will be exported to HTML when you export the document. (Equivalent to setting HTMLDontExport to false.)

Export children as pages

If this box is checked, this note’s children will be exported to HTML when you export the document. (Equivalent to setting HTMLExportChildren to true.)

Markup text

If this box is checked, Tinderbox’s export to HTML attempts to translate text styles, such as italics, boldface, and relative size, as well as elements that look like headings or lists, to similar text styles using HTML markup.

If this box is unchecked, Tinderbox exports the text of the note without any added HTML markup codes.

Quote HTML

Check this if you want to include examples of HTML in your text as HTML -- i.e., <p> will appear as <p>, not be translated into a paragraph break. (Equivalent to setting the HTMLQuoteHTML attribute to true)

File name

When Tinderbox exports a note to HTML, it automatically generates a name for the HTML file base on the note’s title. If you want a note’s file to have a specific name—so that you can know what name to link to from another Web site, for instance—enter a name here. (Equivalent to setting the HTMLExportFilename attribute.)

File extension

The suffix that should be added to the filename for the HTML file. (Equivalent to setting the HTMLExportExtension attribute.)

Template

The template that should be used when exporting this note to HTML. Choose a file name from the popup menu, which lists all the HTML template files in the HTML templates folder. (Equivalent to setting the HTMLExportTemplate attribute.)

Export folder

The folder, usually on your local hard disk, where the HTML files created for this document should be saved.

HTML VIEW PREVIEW BUTTONS

These are all found in the Export pane of a note's HTML View window.

Update

Click this button to update the HTML shown in the window to reflect any changes you have made to the options in this window.

Export

Click this button to export the note to HTML.

Remember that exporting will overwrite any older HTML files of the same name(s).

Preview

Click this button to export the note to HTML, then open the resulting HTML automatically in your Web browser of choice.

(The Open file with: option, in the HTML tab of Document Preferences, determines what application the HTML file will open with. To open the Preferences dialog, choose Document Preferences... from the Edit menu or press Cmd-8)

Edit

Click this button to edit the template file used for this note. The template file will open with whatever application you used to create it—a template created with BBEdit will open in BBEdit, a template created in Dreamweaver will open in Dreamweaver, and so on.

You can then modify the template, save your changes, return to Tinderbox, and click Update, Export, or Preview, to see how your changes affect the export of the note.

HTML VIEW MARKUP CHOICES

These first three are in the Paragraph tab at the top of the HTML view window:

first paragraph

These fields specify what HTML markup should surround the first paragraph of text when the text of this note is exported to HTML. They default to <p> and </p>. (Equivalent to setting the HTMLFirstParagraphStart and HTMLFirstParagraphEnd attributes.)

subsequent paragraphs

As above, but for all other paragraphs of text in the text of the note. (Equivalent to setting the HTMLParagraphStart and HTMLParagraphEnd attributes.)

indented paragraphs

Tinderbox recognizes paragraphs that begin with a tab character as special. These are exported with HTMLIndentedParagraphStart and HTMLIndentedParagraphEnd tags. Starting a paragraph with a tab character is often used to indicate an indented or block-quote paragraph.

before and after

Empty by default, this is what is exported immediately before a note's opening paragraph markup and after a note's final paragraph market, respectively. Can be useful in connection with CSS stylesheets, such as setting before and after to <div> and </div>. (Equivalent to setting the HTMLExportBefore and HTMLExportAfter attributes.)

These next two are in the Style tab at the top of the HTML view window:

bold

The before and after fields hold the opening and closing tags for bold passages and default to <b> and </b>. (Equivalent to setting HTMLBoldStart and HTMLBoldEnd attributes.)

italic

The before and after fields hold the opening and closing tags for an italic passage, <i> and </i> by default. (Equivalent to setting the HTMLItalicStart and HTMLItalicEnd attributes.)

HTML VIEW NET CHOICES

These are found in the Net pane of a note's HTML View window.

URL

The URL used if this note fetches its contents from the Web, or opens a Web page or email location. (Equivalent to setting the URL attribute)

Open in browser

If checked, opening a text window on this note will also open the Web page indicated by the URL field. (Equivalent to setting the ViewInBrowser attribute)

Autofetch

If checked, the note gets its text from the Web page indicated in the URL field. (Equivalent to setting the AutoFetch attribute)

RSS Import templates: Channel

The default channel template for RSS feeds. (Equivalent to setting the RSSChannel attribute).

RSSImport templates: Item

The default item template for RSSfeeds. (Equivalent to setting the RSSItem attribute).

HTML PREFERENCES

The HTML pane of the Preferences dialog controls how your document will be exported into HTML. You will want to set these options before you export to HTML.

To open the Preferences dialog, choose Document Preferences... from the Edit menu (or press Cmd-8).

URL ( web server)

The text in this field should describe where the HTML files will be stored when your document is available for Web reading (no matter where they are originally saved). Some examples:

http://carthage.utara.edu/public/web_texts/

Tip: changing the URL (Web server) information will not change where Tinderbox stores the HTML files—you choose that when you export, using the usual Macintosh file dialog. This information only describes where those files should be for the links to work.

HTML template file

You must choose which template Tinderbox should use by default when you export to HTML. This will be the template used for notes that do not specify a different template.

Click this button to get the Macintosh file dialog: find the template file you want to use, and click Choose in the file dialog.

Tip: choosing a file with this option tells Tinderbox to look in that same folder for all other HTML export templates.

Export Links:

text links

If this option is turned on, Tinderbox will translate the text links in your Tinderbox document into links in the Web hypertext. This feature is turned on by default.

Since text links are the link feature that is most nearly the same in Tinderbox and the World Wide Web, it is unlikely that you would turn this option off.

basic links

Tinderbox basic links—the links that connect one note with another—are not text links, so HTML cannot directly support them. If this option is turned on, Tinderbox will add linked text to each Web page for every basic link leading from the Tinderbox note. These extra links will lead where the original Tinderbox basic links led.

The contents and format of the text added for the basic links depends on the template file you choose for your HTML export. (If that template file contains no provisions for exporting basic links, turning this option on or off has no effect.)

hierarchical links

If this option is turned on, Tinderbox will add linked text to each Web page to provide access to the notes that are nearby in the Tinderbox hierarchy. (Parents, children, siblings, and ancestors such as grandparents.)

The contents and format of the text added for the hierarchical links depends on the template file you choose for your HTML export. (If that template file contains no provisions for exporting hierarchical links, turning this option on or off has no effect.)

link types

If this option is turned on, the type of each link is exported to HTML as the title of that link. Some Web browsers display the title of a link when the user holds the cursor over the link. (Other Web browsers mostly ignore link titles.) Links that have no type are not assigned a title.

Exported file names:

Choose whether the names for the HTML files Tinderbox creates should end with the .html extension or .htm.

Open file with:

For convenience while testing your exported files on your Macintosh, select which application should open when you double-click one of these HTML files.

Link images as:

Tinderbox must translate the images in your document from the Macintosh image format (PICT) to a format suitable for use on the Web. You may choose to have images translated into JPEG images, or into PNG images. (At this writing, PNG images are only understood by newer Web browsers.) Tinderbox creates the image files, and the references to them in the HTML files.

Export paragraphs:

as prose: if this option is selected, paragraph breaks (carriage returns) in text are exported as paragraph markers

in HTML. This is standard HTML for most applications. On most Web browsers, this separates paragraphs of text with a bit of extra white space. This option is selected by default.

as poetry: if this option is selected, paragraph breaks (carriage returns) in text are exported as break markers
in HTML. This can be useful if you are using line breaks to separate lines—as in poetry, or lists of data—that should not be separated by extra white space when converted to Web format.

CREATING AND MODIFYING TEMPLATES

In creating new templates, it will often be easiest to start with an existing template file and modify it to fit your needs. The templates that come with Tinderbox are stored in the HTML export templates folder within the folder containing the Tinderbox application. To make sure that you always have unaltered versions of the templates provided, you should copy a template file before making your changes to the copy.

To modify a template file, simply open the template file in an HTML editor or text editor, and make the desired changes. A template file should be saved as a plain text file. Some templates provided with Tinderbox may include comments to help you understand the structures in the template, so you can use them to create the features that you want.

To export a document to HTML

From anywhere,

In the Preferences dialog,

Then, from anywhere,

Exporting to HTML may take a few seconds.

Recall that when you export your document into HTML, Tinderbox creates many HTML files and also many new folders to put them in. For instance, if the note “Big Cats” contains the notes “Lions”, “Tigers”, and “Jaguars”, Tinderbox will create the HTML file bigcats.html, as well as the new folder bigcats. The folder bigcats will contain the HTML files lions.html, tigers.html, and jaguars.html.

ATTRIBUTES FOR HTML EXPORT

The sections on HTML view windows and HTML view export choices, earlier in this chapter, describe setting these attributes via the controls on the HTML view window

Sever attributes that a note has can affect how it is exported to HTML.:

HTMLDontExport

Boolean attribute. If true, the note won't be exported when other notes in the same document are exported to HTML. No aliases of this note will be exported. If other notes ^include this note, nothing will be added.

HTMLExportChildren

Boolean attribute. If false, the children of the note will not be exported upon export to HTML.

Remember that if this attribute is false, Tinderbox never even examines the child notes when exporting to HTML. So individual child notes may have HTMLDontExport set either true or false, and will not be exported in either case.

The easiest way to set this attribute is with the Export children as pages checkbox on the HTML view window for the note.

HTMLExportExtension

Text attribute. The extension added to the end of the HTML file created for this note. Defaults to .html.

The easiest way to set this attribute is with the File extension text field on the HTML view window for the note.

HTMLExportFileName

Text attribute. The name of the HTML file created for this note.

In most cases this field is blank, and Tinderbox automatically creates a name for the HTML file from the note name. For a particular note this may not be what you want: perhaps you’d rather have a more legible name, or perhaps other sites refer to a particular file. In that case you can use this attribute to tell Tinderbox what file name to use instead.

The easiest way to set this attribute is with the File name text field on the HTML view window for the note.

HTMLExportTemplate

Filename attribute. The template that should be used to export this note to HTML. If left blank, the note is exported with the default HTML template, as set in Preferences.

The easiest way to set this attribute is with the Template popup menu on the HTML view window for the note.

GETTING EXACTLY WHAT YOU WANT

Let’s say you’ve exported a note to HTML, and the Web page isn't exactly what you want. What do you fix?

You could edit the Web page in a text editor or Web page editor and fix the mistake—change "Thoreua" to "Thoreau". But the original Tinderbox note will still have the mistake, and if you export it again, the mistake will reappear in the Web page.

Or, you could fix the mistake in the Tinderbox note, and then export it again to HTML. This gets you a new Web page, with the mistake fixed, and eliminates it once and for all.

Remember that you can select text in an HTML view window: hold down option while you select the text. This lets you copy the text, in case you want to inspect or test its HTML elsewhere.

Again, you could edit the Web page in a text editor or Web page editor and make the change. But if you use the template you used here for more than one Tinderbox note, you will have to make this change many times—once for each Web page created using this template.

A better idea is to use that text editor or Web page editor to edit the template that was used to create this Web page. In the template, change the cellpadding or background color or make whatever change you’ve decided on.

Then, export the note (or notes) again, using the modified HTML template. The change you made to the template will be reflected in all the new HTML files created with it.


Up: Tinderbox User's Manual
Previous: Exporting to HTML  Next: HTML Templates 

[Last updated: 26 Jul 2009]

Google search TB Help for:  


Made with Tinderbox