Package =TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki.On this page:
ClassMethod new ($session)Creates a new rendererObjectMethod finish ()Break circular references.ObjectMethod renderParent ($web,$topic,$meta,$params) -> $textRender parent meta-dataObjectMethod renderMoved ($web,$topic,$meta,$params) -> $textRender moved meta-dataStaticMethod *chompUtf8Fragment ($str) -> $strString truncation may happen in the middle of a UTF-8 byte sequence. This function gets rid of the truncated fragment.ObjectMethod makeAnchorName ($anchorName,$compatibilityMode) -> $anchorName
ObjectMethod *makeUniqueAnchorName ($web,$topic,$anchorName,$compatibility) -> $anchorName
ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb,$hasExplicitLinkLabel,$theParams) -> $htmlGenerate a link. Note: Topic names may be spaced out. Spaced out names are converted to WikWords, for example, "spaced topic name" points to "SpacedTopicName".
| ||||||||
Added: | ||||||||
> > | ObjectMethod renderFORM (%params,$topic,$web) -> $tmlReturns TML of a TWiki Form, based on variable. | |||||||
ObjectMethod renderFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a tag. | ||||||||
Added: | ||||||||
> > |
ObjectMethod renderEDITFORM (%params,$topic,$web) -> $tmlReturns TML of a TWiki Form, based on variable. | |||||||
ObjectMethod *renderEDITFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a EDITFORMFIELD Error: Required form field name is missing tag.ObjectMethod *getRenderedVersion ($text,$theWeb,$theTopic) -> $htmlThe main rendering function.StaticMethod *verbatimCallBackCallback for use with putBackBlocks that replaces < and > by their HTML entities < and >ObjectMethod TML2PlainText ($text,$web,$topic,$opts) -> $plainTextClean up TWiki text for display as plain text without pushing it through the full rendering pipeline. Intended for generation of topic and change summaries. Adds nop tags to prevent TWiki subsequent rendering; nops get removed at the very end. Defuses TML. $opts:
ObjectMethod *protectPlainText ($text) -> $tmlProtect plain text from expansions that would normally be done duing rendering, such as wikiwords. Topic summaries, for example, have to be protected this way.ObjectMethod *makeTopicSummary ($theText,$theTopic,$theWeb,$theFlags) -> $tmlMakes a plain text summary of the given topic by simply trimming a bit off the top. Truncates to $TMTRUNC chars or, if a number is specified in $theFlags, to that length.ObjectMethod takeOutBlocks (\$text,$tag,\%map) -> $text
ObjectMethod putBackBlocks (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
|
Package =TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki.On this page:
ClassMethod new ($session)Creates a new rendererObjectMethod finish ()Break circular references.ObjectMethod renderParent ($web,$topic,$meta,$params) -> $textRender parent meta-dataObjectMethod renderMoved ($web,$topic,$meta,$params) -> $textRender moved meta-dataStaticMethod *chompUtf8Fragment ($str) -> $strString truncation may happen in the middle of a UTF-8 byte sequence. This function gets rid of the truncated fragment.ObjectMethod makeAnchorName ($anchorName,$compatibilityMode) -> $anchorName
ObjectMethod *makeUniqueAnchorName ($web,$topic,$anchorName,$compatibility) -> $anchorName
| ||||||||
Changed: | ||||||||
< < | ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb,$hasExplicitLinkLabel) -> $html | |||||||
> > | ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb,$hasExplicitLinkLabel,$theParams) -> $html | |||||||
Generate a link.
Note: Topic names may be spaced out. Spaced out names are converted to WikWords,
for example, "spaced topic name" points to "SpacedTopicName".
| ||||||||
Added: | ||||||||
> > |
| |||||||
Called by _handleWikiWord and _handleSquareBracketedLink and by Func::internalLink
Calls _renderWikiWord, which in turn will use Plurals.pm to match fold plurals to equivalency with their singular form
SMELL: why is this available to Func?
ObjectMethod renderFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a tag.ObjectMethod *renderEDITFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a EDITFORMFIELD Error: Required form field name is missing tag.ObjectMethod *getRenderedVersion ($text,$theWeb,$theTopic) -> $htmlThe main rendering function.StaticMethod *verbatimCallBackCallback for use with putBackBlocks that replaces < and > by their HTML entities < and >ObjectMethod TML2PlainText ($text,$web,$topic,$opts) -> $plainTextClean up TWiki text for display as plain text without pushing it through the full rendering pipeline. Intended for generation of topic and change summaries. Adds nop tags to prevent TWiki subsequent rendering; nops get removed at the very end. Defuses TML. $opts:
ObjectMethod *protectPlainText ($text) -> $tmlProtect plain text from expansions that would normally be done duing rendering, such as wikiwords. Topic summaries, for example, have to be protected this way.ObjectMethod *makeTopicSummary ($theText,$theTopic,$theWeb,$theFlags) -> $tmlMakes a plain text summary of the given topic by simply trimming a bit off the top. Truncates to $TMTRUNC chars or, if a number is specified in $theFlags, to that length.ObjectMethod takeOutBlocks (\$text,$tag,\%map) -> $text
ObjectMethod putBackBlocks (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
|
Package =TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki.On this page:
ClassMethod new ($session)Creates a new rendererObjectMethod finish ()Break circular references.ObjectMethod renderParent ($web,$topic,$meta,$params) -> $textRender parent meta-dataObjectMethod renderMoved ($web,$topic,$meta,$params) -> $textRender moved meta-data | ||||||||
Added: | ||||||||
> > | StaticMethod *chompUtf8Fragment ($str) -> $strString truncation may happen in the middle of a UTF-8 byte sequence. This function gets rid of the truncated fragment. | |||||||
ObjectMethod makeAnchorName ($anchorName,$compatibilityMode) -> $anchorName
ObjectMethod *makeUniqueAnchorName ($web,$topic,$anchorName,$compatibility) -> $anchorName
ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb,$hasExplicitLinkLabel) -> $htmlGenerate a link. Note: Topic names may be spaced out. Spaced out names are converted to WikWords, for example, "spaced topic name" points to "SpacedTopicName".
ObjectMethod renderFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a tag. | ||||||||
Added: | ||||||||
> > |
ObjectMethod *renderEDITFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a EDITFORMFIELD Error: Required form field name is missing tag. | |||||||
ObjectMethod *getRenderedVersion ($text,$theWeb,$theTopic) -> $htmlThe main rendering function.StaticMethod *verbatimCallBackCallback for use with putBackBlocks that replaces < and > by their HTML entities < and >ObjectMethod TML2PlainText ($text,$web,$topic,$opts) -> $plainTextClean up TWiki text for display as plain text without pushing it through the full rendering pipeline. Intended for generation of topic and change summaries. Adds nop tags to prevent TWiki subsequent rendering; nops get removed at the very end. Defuses TML. $opts:
ObjectMethod *protectPlainText ($text) -> $tmlProtect plain text from expansions that would normally be done duing rendering, such as wikiwords. Topic summaries, for example, have to be protected this way.ObjectMethod *makeTopicSummary ($theText,$theTopic,$theWeb,$theFlags) -> $tmlMakes a plain text summary of the given topic by simply trimming a bit off the top. Truncates to $TMTRUNC chars or, if a number is specified in $theFlags, to that length.ObjectMethod takeOutBlocks (\$text,$tag,\%map) -> $text
ObjectMethod putBackBlocks (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
|
Package =TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki.On this page:
ClassMethod new ($session)Creates a new rendererObjectMethod finish ()Break circular references.ObjectMethod renderParent ($web,$topic,$meta,$params) -> $textRender parent meta-dataObjectMethod renderMoved ($web,$topic,$meta,$params) -> $textRender moved meta-dataObjectMethod makeAnchorName ($anchorName,$compatibilityMode) -> $anchorName
ObjectMethod *makeUniqueAnchorName ($web,$topic,$anchorName,$compatibility) -> $anchorName
ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb,$hasExplicitLinkLabel) -> $htmlGenerate a link. Note: Topic names may be spaced out. Spaced out names are converted to WikWords, for example, "spaced topic name" points to "SpacedTopicName".
ObjectMethod renderFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a tag.ObjectMethod *getRenderedVersion ($text,$theWeb,$theTopic) -> $htmlThe main rendering function.StaticMethod *verbatimCallBackCallback for use with putBackBlocks that replaces < and > by their HTML entities < and >ObjectMethod TML2PlainText ($text,$web,$topic,$opts) -> $plainTextClean up TWiki text for display as plain text without pushing it through the full rendering pipeline. Intended for generation of topic and change summaries. Adds nop tags to prevent TWiki subsequent rendering; nops get removed at the very end. Defuses TML. $opts:
| ||||||||
Added: | ||||||||
> > |
| |||||||
ObjectMethod *protectPlainText ($text) -> $tmlProtect plain text from expansions that would normally be done duing rendering, such as wikiwords. Topic summaries, for example, have to be protected this way.ObjectMethod *makeTopicSummary ($theText,$theTopic,$theWeb,$theFlags) -> $tmlMakes a plain text summary of the given topic by simply trimming a bit off the top. Truncates to $TMTRUNC chars or, if a number is specified in $theFlags, to that length.ObjectMethod takeOutBlocks (\$text,$tag,\%map) -> $text
ObjectMethod putBackBlocks (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
|
Package =TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki.On this page:
ClassMethod new ($session)Creates a new rendererObjectMethod finish ()Break circular references.ObjectMethod renderParent ($web,$topic,$meta,$params) -> $textRender parent meta-dataObjectMethod renderMoved ($web,$topic,$meta,$params) -> $textRender moved meta-dataObjectMethod makeAnchorName ($anchorName,$compatibilityMode) -> $anchorName
ObjectMethod *makeUniqueAnchorName ($web,$topic,$anchorName,$compatibility) -> $anchorName
ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb,$hasExplicitLinkLabel) -> $html | ||||||||
Changed: | ||||||||
< < | Generate a link. | |||||||
> > | Generate a link. | |||||||
Note: Topic names may be spaced out. Spaced out names are converted to WikWords,
for example, "spaced topic name" points to "SpacedTopicName".
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Called by _handleWikiWord and _handleSquareBracketedLink and by Func::internalLink | ||||||||
Changed: | ||||||||
< < | Calls _renderWikiWord, which in turn will use Plurals.pm to match fold plurals to equivalency with their singular form | |||||||
> > | Calls _renderWikiWord, which in turn will use Plurals.pm to match fold plurals to equivalency with their singular form | |||||||
SMELL: why is this available to Func?
ObjectMethod renderFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a tag.ObjectMethod *getRenderedVersion ($text,$theWeb,$theTopic) -> $htmlThe main rendering function.StaticMethod *verbatimCallBackCallback for use with putBackBlocks that replaces < and > by their HTML entities < and >ObjectMethod TML2PlainText ($text,$web,$topic,$opts) -> $plainTextClean up TWiki text for display as plain text without pushing it through the full rendering pipeline. Intended for generation of | ||||||||
Changed: | ||||||||
< < | topic and change summaries. Adds nop tags to prevent TWiki | |||||||
> > | topic and change summaries. Adds nop tags to prevent TWiki | |||||||
subsequent rendering; nops get removed at the very end.
Defuses TML.
$opts:
ObjectMethod *protectPlainText ($text) -> $tmlProtect plain text from expansions that would normally be done duing rendering, such as wikiwords. Topic summaries, for example, have to be protected this way.ObjectMethod *makeTopicSummary ($theText,$theTopic,$theWeb,$theFlags) -> $tmlMakes a plain text summary of the given topic by simply trimming a bit off the top. Truncates to $TMTRUNC chars or, if a number is specified in $theFlags, to that length.ObjectMethod takeOutBlocks (\$text,$tag,\%map) -> $text
ObjectMethod putBackBlocks (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
|
Package =TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki.On this page:
ClassMethod new ($session)Creates a new rendererObjectMethod finish ()Break circular references.ObjectMethod renderParent ($web,$topic,$meta,$params) -> $textRender parent meta-dataObjectMethod renderMoved ($web,$topic,$meta,$params) -> $textRender moved meta-dataObjectMethod makeAnchorName ($anchorName,$compatibilityMode) -> $anchorName
| ||||||||
Added: | ||||||||
> > | ObjectMethod *makeUniqueAnchorName ($web,$topic,$anchorName,$compatibility) -> $anchorName
| |||||||
ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb,$hasExplicitLinkLabel) -> $htmlGenerate a link. Note: Topic names may be spaced out. Spaced out names are converted to WikWords, for example, "spaced topic name" points to "SpacedTopicName".
ObjectMethod renderFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a tag.ObjectMethod *getRenderedVersion ($text,$theWeb,$theTopic) -> $htmlThe main rendering function.StaticMethod *verbatimCallBackCallback for use with putBackBlocks that replaces < and > by their HTML entities < and >ObjectMethod TML2PlainText ($text,$web,$topic,$opts) -> $plainTextClean up TWiki text for display as plain text without pushing it through the full rendering pipeline. Intended for generation of topic and change summaries. Adds nop tags to prevent TWiki subsequent rendering; nops get removed at the very end. Defuses TML. $opts:
ObjectMethod *protectPlainText ($text) -> $tmlProtect plain text from expansions that would normally be done duing rendering, such as wikiwords. Topic summaries, for example, have to be protected this way.ObjectMethod *makeTopicSummary ($theText,$theTopic,$theWeb,$theFlags) -> $tmlMakes a plain text summary of the given topic by simply trimming a bit off the top. Truncates to $TMTRUNC chars or, if a number is specified in $theFlags, to that length.ObjectMethod takeOutBlocks (\$text,$tag,\%map) -> $text
ObjectMethod putBackBlocks (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
|
Package =TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki.On this page:
ClassMethod new ($session) | ||||||||
Changed: | ||||||||
< < | Creates a new renderer with initial state from preference values | |||||||
> > | Creates a new renderer | |||||||
Deleted: | ||||||||
< < | (NEWTOPICBGCOLOR, NEWTOPICFONTCOLOR NEWTOPICLINKSYMBOL LINKTOOLTIPINFO) | |||||||
Added: | ||||||||
> > | ObjectMethod finish ()Break circular references. | |||||||
ObjectMethod renderParent ($web,$topic,$meta,$params) -> $textRender parent meta-dataObjectMethod renderMoved ($web,$topic,$meta,$params) -> $textRender moved meta-data | ||||||||
Deleted: | ||||||||
< < | ObjectMethod *renderFormField ($web,$topic,$meta,$params) -> $textRender meta-data for a single formfield | |||||||
ObjectMethod makeAnchorName ($anchorName,$compatibilityMode) -> $anchorName | ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
Build a valid HTML anchor name | ||||||||
Changed: | ||||||||
< < | ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb) -> $html | |||||||
> > | ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb,$hasExplicitLinkLabel) -> $html | |||||||
Generate a link.
Note: Topic names may be spaced out. Spaced out names are converted to WikWords,
for example, "spaced topic name" points to "SpacedTopicName".
| ||||||||
Changed: | ||||||||
< < |
| |||||||
> > |
| |||||||
| ||||||||
Added: | ||||||||
> > |
| |||||||
Called by _handleWikiWord and _handleSquareBracketedLink and by Func::internalLink
Calls _renderWikiWord, which in turn will use Plurals.pm to match fold plurals to equivalency with their singular form
SMELL: why is this available to Func?
ObjectMethod renderFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a tag.ObjectMethod *getRenderedVersion ($text,$theWeb,$theTopic) -> $htmlThe main rendering function.StaticMethod *verbatimCallBackCallback for use with putBackBlocks that replaces < and > by their HTML entities < and >ObjectMethod TML2PlainText ($text,$web,$topic,$opts) -> $plainTextClean up TWiki text for display as plain text without pushing it through the full rendering pipeline. Intended for generation of topic and change summaries. Adds nop tags to prevent TWiki subsequent rendering; nops get removed at the very end. Defuses TML. $opts:
ObjectMethod *protectPlainText ($text) -> $tmlProtect plain text from expansions that would normally be done duing rendering, such as wikiwords. Topic summaries, for example, have to be protected this way.ObjectMethod *makeTopicSummary ($theText,$theTopic,$theWeb,$theFlags) -> $tmlMakes a plain text summary of the given topic by simply trimming a bit off the top. Truncates to $TMTRUNC chars or, if a number is specified in $theFlags, to that length. | ||||||||
Deleted: | ||||||||
< < | ObjectMethod *takeOutProtected (\$text,$re,\%map) -> $text
ObjectMethod *putBackProtected (\$text,\%map,$callback) -> $textReturn value: $text with blocks added back
| |||||||
ObjectMethod takeOutBlocks (\$text,$tag,\%map) -> $text
ObjectMethod putBackBlocks (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
| ||||||||
Added: | ||||||||
> > |
| |||||||
| ||||||||
Changed: | ||||||||
< < | The spec of \&fn is sub fn( \$line, \%options ) -> $newLine; the %options hash passed into this function is passed down to the sub, and the keys in_pre , in_verbatim and in_noautolink are set boolean TRUE if the line is from one (or more) of those block types. | |||||||
> > | The spec of \&fn is sub fn( $line, \%options ) -> $newLine . The %options | |||||||
Added: | ||||||||
> > | hash passed into this function is passed down to the sub, and the keys
in_literal , in_pre , in_verbatim and in_noautolink are set boolean
TRUE if the line is from one (or more) of those block types. | |||||||
The return result replaces $line in $newText. | ||||||||
Added: | ||||||||
> > | StaticMethod getReferenceRE ($web,$topic,%options) -> $re
s///
| |||||||
StaticMethod *replaceTopicReferences ($text,\%options) -> $textCallback designed for use with forEachLine, to replace topic references. \%options contains:
| ||||||||
Deleted: | ||||||||
< < |
| |||||||
StaticMethod *replaceWebReferences ($text,\%options) -> $textCallback designed for use with forEachLine, to replace web references. \%options contains:
ObjectMethod *replaceWebInternalReferences (\$text,\%meta,$oldWeb,$oldTopic)Change within-web wikiwords in $$text and $meta to full web.topic syntax. \%options must include topics => list of topics that must have references to them changed to include the web specifier. | ||||||||
Deleted: | ||||||||
< < | StaticMethod *renderFormFieldArg ($meta,$args) -> $textParse the arguments to a $formfield specification and extract the relevant formfield from the given meta data.
args can be appended with a commas
followed by a string format (\d+)([,\s*]\.\.\.)?). This supports the formatted
search function $formfield and is used to shorten the returned string or a
hyphenated string.
| |||||||
StaticMethod breakName ($text,$args) -> $text
| ||||||||
Added: | ||||||||
> > |
StaticMethod *protectFormFieldValue ($value,$attrs) -> $htmlGiven the value of a form field, and a set of attributes that control how to display that value, protect the value from further processing. The protected value is determined from the value of the field after:
| |||||||
Package =TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki.On this page:
ClassMethod new ($session)Creates a new renderer with initial state from preference values (NEWTOPICBGCOLOR, NEWTOPICFONTCOLOR NEWTOPICLINKSYMBOL LINKTOOLTIPINFO)ObjectMethod renderParent ($web,$topic,$meta,$params) -> $textRender parent meta-dataObjectMethod renderMoved ($web,$topic,$meta,$params) -> $textRender moved meta-dataObjectMethod *renderFormField ($web,$topic,$meta,$params) -> $textRender meta-data for a single formfieldObjectMethod makeAnchorName ($anchorName,$compatibilityMode) -> $anchorName
ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb) -> $htmlGenerate a link. Note: Topic names may be spaced out. Spaced out names are converted to WikWords, for example, "spaced topic name" points to "SpacedTopicName".
ObjectMethod renderFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a tag.ObjectMethod *getRenderedVersion ($text,$theWeb,$theTopic) -> $htmlThe main rendering function.StaticMethod *verbatimCallBackCallback for use with putBackBlocks that replaces < and > by their HTML entities < and >ObjectMethod TML2PlainText ($text,$web,$topic,$opts) -> $plainTextClean up TWiki text for display as plain text without pushing it through the full rendering pipeline. Intended for generation of topic and change summaries. Adds nop tags to prevent TWiki subsequent rendering; nops get removed at the very end. Defuses TML. $opts:
ObjectMethod *protectPlainText ($text) -> $tmlProtect plain text from expansions that would normally be done duing rendering, such as wikiwords. Topic summaries, for example, have to be protected this way.ObjectMethod *makeTopicSummary ($theText,$theTopic,$theWeb,$theFlags) -> $tmlMakes a plain text summary of the given topic by simply trimming a bit off the top. Truncates to $TMTRUNC chars or, if a number is specified in $theFlags, to that length.ObjectMethod *takeOutProtected (\$text,$re,\%map) -> $text
| ||||||||
Changed: | ||||||||
< < | ObjectMethod *putBackProtected (\$text,\%map,$tag,$newtag,$callBack) -> $text | |||||||
> > | ObjectMethod *putBackProtected (\$text,\%map,$callback) -> $text | |||||||
Return value: $text with blocks added back
| ||||||||
Added: | ||||||||
> > |
| |||||||
Reverses the actions of takeOutProtected.
ObjectMethod takeOutBlocks (\$text,$tag,\%map) -> $text
ObjectMethod putBackBlocks (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
|
Package =TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki.On this page:
ClassMethod new ($session)Creates a new renderer with initial state from preference values (NEWTOPICBGCOLOR, NEWTOPICFONTCOLOR NEWTOPICLINKSYMBOL LINKTOOLTIPINFO)ObjectMethod renderParent ($web,$topic,$meta,$params) -> $textRender parent meta-dataObjectMethod renderMoved ($web,$topic,$meta,$params) -> $textRender moved meta-dataObjectMethod *renderFormField ($web,$topic,$meta,$params) -> $textRender meta-data for a single formfieldObjectMethod makeAnchorName ($anchorName,$compatibilityMode) -> $anchorName
ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb) -> $htmlGenerate a link. Note: Topic names may be spaced out. Spaced out names are converted to WikWords, for example, "spaced topic name" points to "SpacedTopicName".
ObjectMethod renderFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a tag.ObjectMethod *getRenderedVersion ($text,$theWeb,$theTopic) -> $htmlThe main rendering function.StaticMethod *verbatimCallBackCallback for use with putBackBlocks that replaces < and > by their HTML entities < and >ObjectMethod TML2PlainText ($text,$web,$topic,$opts) -> $plainTextClean up TWiki text for display as plain text without pushing it through the full rendering pipeline. Intended for generation of topic and change summaries. Adds nop tags to prevent TWiki subsequent rendering; nops get removed at the very end. Defuses TML. $opts:
ObjectMethod *protectPlainText ($text) -> $tmlProtect plain text from expansions that would normally be done duing rendering, such as wikiwords. Topic summaries, for example, have to be protected this way.ObjectMethod *makeTopicSummary ($theText,$theTopic,$theWeb,$theFlags) -> $tmlMakes a plain text summary of the given topic by simply trimming a bit off the top. Truncates to $TMTRUNC chars or, if a number is specified in $theFlags, to that length.ObjectMethod *takeOutProtected (\$text,$re,\%map) -> $text
ObjectMethod *putBackProtected (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
ObjectMethod takeOutBlocks (\$text,$tag,\%map) -> $text
ObjectMethod putBackBlocks (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
| ||||||||
Added: | ||||||||
> > |
args can be appended with a commas
followed by a string format (\d+)([,\s*]\.\.\.)?). This supports the formatted
search function $formfield and is used to shorten the returned string or a
hyphenated string. | |||||||
StaticMethod breakName ($text,$args) -> $text
|
Package =TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki.On this page:
ClassMethod new ($session)Creates a new renderer with initial state from preference values (NEWTOPICBGCOLOR, NEWTOPICFONTCOLOR NEWTOPICLINKSYMBOL LINKTOOLTIPINFO)ObjectMethod renderParent ($web,$topic,$meta,$params) -> $text | |||||||||
Added: | |||||||||
> > | |||||||||
Render parent meta-data
ObjectMethod renderMoved ($web,$topic,$meta,$params) -> $text | |||||||||
Added: | |||||||||
> > | |||||||||
Render moved meta-data
ObjectMethod *renderFormField ($web,$topic,$meta,$params) -> $text | |||||||||
Added: | |||||||||
> > | |||||||||
Render meta-data for a single formfield
ObjectMethod makeAnchorName ($anchorName,$compatibilityMode) -> $anchorName
ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb) -> $htmlGenerate a link. | |||||||||
Changed: | |||||||||
< < | SMELL: why can topic be spaced out? is this to support auto squishing of Spaced Topic Naming? and lowercase Spaced Topic Naming | ||||||||
> > | Note: Topic names may be spaced out. Spaced out names are converted to WikWords, for example, "spaced topic name" points to "SpacedTopicName". | ||||||||
ObjectMethod renderFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a tag.ObjectMethod *getRenderedVersion ($text,$theWeb,$theTopic) -> $htmlThe main rendering function.StaticMethod *verbatimCallBackCallback for use with putBackBlocks that replaces < and > by their HTML entities < and >ObjectMethod TML2PlainText ($text,$web,$topic,$opts) -> $plainTextClean up TWiki text for display as plain text without pushing it through the full rendering pipeline. Intended for generation of topic and change summaries. Adds nop tags to prevent TWiki subsequent rendering; nops get removed at the very end. Defuses TML. $opts:
ObjectMethod *protectPlainText ($text) -> $tmlProtect plain text from expansions that would normally be done duing rendering, such as wikiwords. Topic summaries, for example, have to be protected this way.ObjectMethod *makeTopicSummary ($theText,$theTopic,$theWeb,$theFlags) -> $tmlMakes a plain text summary of the given topic by simply trimming a bit off the top. Truncates to $TMTRUNC chars or, if a number is specified in $theFlags, to that length.ObjectMethod *takeOutProtected (\$text,$re,\%map) -> $text
ObjectMethod *putBackProtected (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
ObjectMethod takeOutBlocks (\$text,$tag,\%map) -> $text
ObjectMethod putBackBlocks (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
| |||||||||
Deleted: | |||||||||
< < |
| ||||||||
| |||||||||
Added: | |||||||||
> > |
| ||||||||
ObjectMethod *summariseChanges ($user,$web,$topic,$orev,$nrev,$tml) -> $text | |||||||||
Added: | |||||||||
> > | |||||||||
$tml is not set, all HTML will be removed.
In non-tml, lines are truncated to 70 characters. Differences are shown using + and - to indicate added and removed text.
ObjectMethod forEachLine ($text,\&fn,\%options) -> $newTextIterate over each line, calling\&fn on each.
\%options may contain:
in_pre , in_verbatim and in_noautolink are set boolean TRUE if the line is from one (or more) of those block types.
The return result replaces $line in $newText.
StaticMethod *replaceTopicReferences ($text,\%options) -> $text | |||||||||
Added: | |||||||||
> > | |||||||||
Callback designed for use with forEachLine, to replace topic references.
\%options contains:
StaticMethod *replaceWebReferences ($text,\%options) -> $text | |||||||||
Added: | |||||||||
> > | |||||||||
Callback designed for use with forEachLine, to replace web references.
\%options contains:
ObjectMethod *replaceWebInternalReferences (\$text,\%meta,$oldWeb,$oldTopic)Change within-web wikiwords in $$text and $meta to full web.topic syntax. \%options must include topics => list of topics that must have references to them changed to include the web specifier.StaticMethod *renderFormFieldArg ($meta,$args) -> $textParse the arguments to a $formfield specification and extract the relevant formfield from the given meta data.StaticMethod breakName ($text,$args) -> $text | |||||||||
Added: | |||||||||
> > | |||||||||
|
Package =TWiki::RenderThis module provides most of the actual HTML rendering code in TWiki.On this page:
ClassMethod new ($session)Creates a new renderer with initial state from preference values (NEWTOPICBGCOLOR, NEWTOPICFONTCOLOR NEWTOPICLINKSYMBOL LINKTOOLTIPINFO)ObjectMethod renderParent ($web,$topic,$meta,$params) -> $textRender parent meta-dataObjectMethod renderMoved ($web,$topic,$meta,$params) -> $textRender moved meta-dataObjectMethod *renderFormField ($web,$topic,$meta,$params) -> $textRender meta-data for a single formfieldObjectMethod makeAnchorName ($anchorName,$compatibilityMode) -> $anchorName
ObjectMethod internalLink ($theWeb,$theTopic,$theLinkText,$theAnchor,$doLink,$doKeepWeb) -> $htmlGenerate a link. SMELL: why can topic be spaced out? is this to support auto squishing of Spaced Topic Naming? and lowercase Spaced Topic Naming
ObjectMethod renderFORMFIELD (%params,$topic,$web) -> $htmlReturns the fully rendered expansion of a tag.ObjectMethod *getRenderedVersion ($text,$theWeb,$theTopic) -> $htmlThe main rendering function.StaticMethod *verbatimCallBackCallback for use with putBackBlocks that replaces < and > by their HTML entities < and >ObjectMethod TML2PlainText ($text,$web,$topic,$opts) -> $plainTextClean up TWiki text for display as plain text without pushing it through the full rendering pipeline. Intended for generation of topic and change summaries. Adds nop tags to prevent TWiki subsequent rendering; nops get removed at the very end. Defuses TML. $opts:
ObjectMethod *protectPlainText ($text) -> $tmlProtect plain text from expansions that would normally be done duing rendering, such as wikiwords. Topic summaries, for example, have to be protected this way.ObjectMethod *makeTopicSummary ($theText,$theTopic,$theWeb,$theFlags) -> $tmlMakes a plain text summary of the given topic by simply trimming a bit off the top. Truncates to $TMTRUNC chars or, if a number is specified in $theFlags, to that length.ObjectMethod *takeOutProtected (\$text,$re,\%map) -> $text
ObjectMethod *putBackProtected (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
ObjectMethod takeOutBlocks (\$text,$tag,\%map) -> $text
ObjectMethod putBackBlocks (\$text,\%map,$tag,$newtag,$callBack) -> $textReturn value: $text with blocks added back
|