Tinderbox 7 Icon

HTMLQuoteHTML


Attribute Data Type: 

Attribute Default Value: 

Attribute Group: 

Attribute Purpose: 

Attribute Inherited from Preferences?   

Attribute Read-Only? 

Attribute Intrinsic? 

Attribute First Added: 

Attribute Altered: 

 boolean   [other boolean-type attributes]

 false

 HTML   [other HTML Group attributes]

 HTML export encoding

 No

 No

 No

 Baseline

 


Indicate that any valid HTML mark-up in the source text of the of the current note will be rendered as text (i.e. exported as entities) instead of as HTML code.

For 'HTML mark-up' you can read any code written within in <> angle brackets (XML, PHP, etc.). Thus, a true setting exports a '<br>' in the source text as '&lt;br&gt;' that shows as screen text whereas a false setting exports it as '<br>', i.e. a HTML source code line break like you see here between the apostrophes.

Values exported via ^value()^ and such will be parsed for HTML entities in addition to note text.

When set to true, where sections of mark-up include line breaks in the Tinderbox note, it does not output the line returns after each line of code - i.e. they form continuous text in the HTML output - unless the there is at least one character at the beat the beginning or end of the line outside the code within <> characters. In addition, the normal space character (spacebar) and Tab characters do not count for this purpose. Thus text in the TBX source like:

<key>Value1</key>

<key>Value2</key> 

renders on one line in the output:

<key>Value1</key><key>Value2</key> 

So, how then to form a line break in the HTML output without adding visible unwanted text? If you add an Option+space character to the end of the first code line in the source text:

<key>Value1</key>[opt+space] 

<key>Value2</key> 

…the (visible) HTML output result is formatted on two lines with no extraneous tags:

<key>Value1</key> 

<key>Value2</key> 

You can put this special space entity at the beginning or end to trigger the lines to be output as paragraphs. If you want some lines of code indented, just use several &nbsp; thus:

&nbsp;&nbsp;&nbsp;<key>Value1</key>

For control over whether any mark-up at all is applied to source text during HTML export, see the $HTMLMarkupText attribute. For quoting code, it can be more flexible to use build-in support for inline <code> and <pre> tags.

To assist with the export of code samples in notes, Tinderbox recognises the <code></code> tag pair and exports the tags and all code between them verbatim when $HTMLQuoteHTML is set to false; the app's expectation is the user will provide CSS styling of the <code> element. As the <code> element is omitted unchanged this should allow for styling variations by applying ID or class values. To preserve line returns in code samples include the CSS rule for <code> - "white-space: pre;". This both honours line ends and white space exactly.

The next 2 examples are both code snippets indented with 5 spaces in the note source text, first without <code>:

$MyAttribute = "house"

$MyNumber = 1

…and here with <code> mark-up:

$MyAttribute = "house"

$MyNumber = 1

The output is seen on the web page in monospace font, but all on one line. However, if you want the white space and line ends in the source to be respected use <pre> as well:

     $MyAttribute  =  "house"
     $MyNumber  =  1

Note however, that the same limitation as described above for note text lines beginning with < and ending in > still applies to auto-handled <code></code> sections when on a single line. The cleanest method to resolve the conflicting output results for a single line sample is to end the line with an Opt+space character. That results in the line being wrapped in <p> tags. Even better, if you start the line with a Tab character, the output will use the HTML set in your HTML Inspector's Markup tab for indented paragraphs.

Also see the note on Exporting code samples.