Skip to content

Commit

Permalink
added output for preview
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul.W Harvey authored and Paul.W Harvey committed Oct 23, 2011
1 parent e9e9bbf commit a5500a8
Show file tree
Hide file tree
Showing 6 changed files with 1,623 additions and 0 deletions.
424 changes: 424 additions & 0 deletions TestCases/FormattedSearch.txt.html

Large diffs are not rendered by default.

276 changes: 276 additions & 0 deletions TestCases/GluePlugin.txt.html

Large diffs are not rendered by default.

357 changes: 357 additions & 0 deletions TestCases/Macros.txt.html

Large diffs are not rendered by default.

367 changes: 367 additions & 0 deletions TestCases/SearchPatternCookbook.txt.html

Large diffs are not rendered by default.

86 changes: 86 additions & 0 deletions TestCases/TextFormattingRules.txt.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<!-- Generator: GNU source-highlight 3.1.4
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt><b><font color="#0000FF">%META:TOPICINFO{</font></b><font color="#009900">author=</font><font color="#FF0000">"ProjectContributor"</font><b><font color="#0000FF"> </font></b><font color="#009900">date=</font><font color="#FF0000">"1284962225"</font><b><font color="#0000FF"> </font></b><font color="#009900">format=</font><font color="#FF0000">"1.1"</font><b><font color="#0000FF"> </font></b><font color="#009900">version=</font><font color="#FF0000">"1"</font><b><font color="#0000FF">}%</font></b>
<b><font color="#0000FF">%META:TOPICPARENT{</font></b><font color="#009900">name=</font><font color="#FF0000">"UsersGuide"</font><b><font color="#0000FF">}%</font></b>
<b><font color="#0000FF">%STARTINCLUDE%</font></b>
<b><font color="#000080">---+</font></b> Text Formatting

Working in Foswiki is as easy as typing in text. You don't need to know HTML, though you can use it if you prefer. Links to topics are created automatically when you enter WikiWords. And Foswiki shorthand gives you all the power of HTML with a simple coding system that takes no time to learn. It's all laid out below.

<b><font color="#0000FF">%TOC{</font></b><font color="#009900">depth=</font><font color="#FF0000">"4"</font><b><font color="#0000FF">}%</font></b>

#EditingShorthand
<b><font color="#000080">---++</font></b> Editing Shorthand

<b><font color="#0000FF">%INCLUDE{</font></b><font color="#FF0000">"EditingShorthand"</font><b><font color="#0000FF">}%</font></b>

<b><font color="#000080">---++</font></b> Using HTML

<b><font color="#0000FF">%INCLUDE{</font></b><font color="#FF0000">"UsingHTML"</font><b><font color="#0000FF">}%</font></b>

<b><font color="#000080">---++</font></b> Hyperlinks

Being able to create links without any special formatting is a core Foswiki feature, made possible with WikiWords, <u><font color="#0000FF">[[ACRONYM][Acronyms]]</font></u>, and inline URLs.

<b><font color="#000080">---+++</font></b> Internal Links

* GoodStyle is a WikiWord that links to the <b><font color="#000080">&lt;nop&gt;</font></b>GoodStyle topic located in the current web.

* NotExistingYet is a topic waiting to be written. Create the topic by clicking on the *?*. (Try clicking, but then, *Cancel* - creating the topic would wreck this example!)

* ACRONYM links to a topic name consisting of only upper-case letters. Acronyms are linked only if the target topic actually exists.

<b><font color="#000080">---+++</font></b> External Links

* Protocols matching the configuration parameter =LinkProtocolPattern=, which by default is set to =(file|ftp|gopher|https|http|irc|mailto|news|nntp|telnet)=, are linked automatically. You might change this setting to add more protocols (such as smb).
<b><font color="#0000FF">&lt;blockquote</font></b> <font color="#009900">class</font><font color="#990000">=</font><font color="#FF0000">"foswikiHelp"</font><b><font color="#0000FF">&gt;%T%</font></b> =LinkProtocolPattern= is an
_expert_ setting in the Foswiki configuration and can only be changed
by a systems administrator.<b><font color="#0000FF">&lt;/blockquote&gt;</font></b>
Thus, all lines containing:
* =file://...=
* =ftp://...=
* =gopher://...=
* =https://...=
* =http://...=
* =irc://...=
* =mailto:...@...=
* =news://...=
* =nntp://...=
* =telnet://...=
are linked automatically.
* E-mail addresses like =name@domain.com= are linked automatically.
* =[<b><font color="#000080">&lt;nop&gt;</font></b>[Square bracket rules]]= let you easily create <u><font color="#0000FF">[[#SquareBrackets][non-WikiWord links]]</font></u>.
* You can also write =[<b><font color="#000080">&lt;nop&gt;</font></b>[http://yahoo.com Yahoo home page]]= as an easier way of doing external links with descriptive text for the link, such as <u><font color="#0000FF">[[http://yahoo.com/ Yahoo home page]]</font></u>.

<b><font color="#000080">---++</font></b> Macros

Macros are names enclosed in percent signs that are that are expanded to some other text when the topic is displayed. For example, =%<b><font color="#000080">&lt;nop&gt;</font></b>TOPIC%= is expanded to <b><font color="#0000FF">%TOPIC%</font></b>, the title of this topic.

Some macros can take arguments in curly braces - for example, =%<b><font color="#000080">&lt;nop&gt;</font></b>INCLUDE{"OtherTopic" ARG="arg"}%=.

Many macro definitions are built-in, and others (<u><font color="#0000FF">[[</font></u><b><font color="#0000FF">%SYSTEMWEB%</font></b><u><font color="#0000FF">.PreferenceSettings][preference settings]]</font></u>) are predefined for your convenience. You can also define your own
<u><font color="#0000FF">[[</font></u><b><font color="#0000FF">%SYSTEMWEB%</font></b><u><font color="#0000FF">.PreferenceSettings][preference settings]]</font></u> at the entire site, individual web, or individual topic level. For more information, see *<u><font color="#0000FF">[[Macros]]</font></u>*

Macros are fully expanded _before_ any of the text formatting rules are applied.

<b><font color="#000080">---++</font></b> Plugin Formatting Extensions

Plugins can extend the functionality of Foswiki into many other areas. There are a huge number of plugins available from the <u><font color="#0000FF">[[Foswiki:Extensions.WebHome][foswiki site]]</font></u>.

Currently enabled plugins on this installation, as listed by =%<b><font color="#000080">&lt;nop&gt;</font></b>PLUGINDESCRIPTIONS%=:
<b><font color="#0000FF">%PLUGINDESCRIPTIONS%</font></b>

Check on current Plugin status and settings for this site in <u><font color="#0000FF">[[</font></u><b><font color="#0000FF">%SYSTEMWEB%</font></b><u><font color="#0000FF">.Plugins]]</font></u>.

<b><font color="#000080">---++</font></b> Common Editing Errors

Foswiki formatting rules are fairly simple to use and quick to type. However, there are some things to watch out for:

* *Q:* Text enclosed in angle brackets like =<b><font color="#000080">&amp;lt;</font></b>filename<b><font color="#000080">&amp;gt;</font></b>= is not displayed. How can I show it as it is?
* *A:* The ='<b><font color="#000080">&amp;lt;</font></b>'= and ='<b><font color="#000080">&amp;gt;</font></b>'= characters have a special meaning in HTML, they define HTML tags. You need to escape them, so write ='<b><font color="#000080">&amp;amp;</font></b>lt;'= instead of ='<b><font color="#000080">&amp;lt;</font></b>'=, and ='<b><font color="#000080">&amp;amp;</font></b>gt;'= instead of ='<b><font color="#000080">&amp;gt;</font></b>'=. <b><font color="#0000FF">&lt;br</font></b> <b><font color="#0000FF">/&gt;</font></b> Example: Type ='prog <b><font color="#000080">&amp;amp;</font></b>lt;filename<b><font color="#000080">&amp;amp;</font></b>gt;'= to get ='prog <b><font color="#000080">&amp;lt;</font></b>filename<b><font color="#000080">&amp;gt;</font></b>'=.

* *Q:* Why is the ='&amp;'= character sometimes not displayed?
* *A:* The ='&amp;'= character has a special meaning in HTML, it starts a so called character entity, i.e. ='<b><font color="#000080">&amp;amp;</font></b>copy;'= is the =<b><font color="#000080">&amp;copy;</font></b>= copyright character. You need to escape ='<b><font color="#000080">&amp;amp;</font></b>'= to see it as it is, so write ='<b><font color="#000080">&amp;amp;</font></b>amp;'= instead of ='<b><font color="#000080">&amp;amp;</font></b>'=. <b><font color="#0000FF">&lt;br</font></b> <b><font color="#0000FF">/&gt;</font></b> Example: Type ='This <b><font color="#000080">&amp;amp;</font></b>amp; that'= to get ='This <b><font color="#000080">&amp;amp;</font></b> that'=.
</tt></pre>
Loading

0 comments on commit a5500a8

Please sign in to comment.