WIKINDX API 6.9.1

HTML

Table of Contents

Functions

filterHTML()  : string
Filter HTML in fields destined for the search_ tables
filterHTMLLinks()  : string
Filter HTML links for LISTCOMMON output
escape()  : mixed
Escape strings inserted in HTML
escapeHTMLTemp()  : mixed
Temporarily escape HTML entities
_inlineHtmlAttribute()  : string
Build a string for insertion of an HTML tag attribute.
h()  : string
<Hx> heading element
div()  : string
<DIV> element
divScrollable()  : string
Scrollable <DIV> element
iframe()  : string
<IFRAME> element
p()  : string
<P> element
pBrowse()  : string
<P> element
pre()  : string
<PRE> element
ul()  : string
<UL> element
ol()  : string
<OL> element
li()  : string
<LI> element
hr()  : string
<HR> element
mark()  : string
<mark> element
object()  : string
<OBJECT> element For display attachment previews
span()  : string
<SPAN> element
color()  : string
<SPAN color> element
strong()  : string
<STRONG> element (Semantic equivalent of <B>)
em()  : string
<EM> element (Semantic equivalent of <I>)
u()  : string
<U> element
img()  : string
<IMG> element
anchor()  : string
<A> element used as internal anchor
a()  : string
<A> element used as hyperlink
aBrowse()  : string
<A> element used as hyperlink
tableStart()  : string
Start a <TABLE> tag
tableEnd()  : string
Close a <TABLE> tag
tableCaption()  : string
provide a table <caption>
tbodyStart()  : string
Provide a <tbody> tag
tbodyEnd()  : string
Provide a </tbody> tag
theadStart()  : string
Provde a <thead> tag
theadEnd()  : string
Provide a </thead> tag
tfootStart()  : string
Provide a <tfoot> tag
tfootEnd()  : string
Provide a </tfoot> tag
trStart()  : string
Provide a <tr> tag
trEnd()  : string
Provide a </tr> tag
tdStart()  : string
Provide a <td> tag without closing it or encapsulating data
tdEnd()  : string
Provide a </td> tag
td()  : string
Provide a <td>...</td> tag
thStart()  : string
Provide a <th> tag without closing it or encapsulating data
thEnd()  : string
Provide a </th> tag
th()  : string
Provide a <th>...</th> tag
cssInlineExternal()  : string
Insert a call to an external CSS file
jsInline()  : string
Inlining JavaScript code
jsInlineExternal()  : string
Insert a call to an external javascript file
successToast()  : string
Format a text as a HTML success toast message (temporary info)
errorToast()  : string
Format a text as a HTML error toast message (temporary info)
nlToHtml()  : string
replace newlines and carriage returns with appropriate HTML code.
htmlToNl()  : string
replace HTML newlines and carriage returns with appropriate ANSI code.
removeNl()  : string
remove all newlines.
stripHtml()  : string
Strip HTML from string
clearSortField()  : string
Strip HTML from string

Functions

filterHTML()

Filter HTML in fields destined for the search_ tables

filterHTML(string $html) : string
Parameters
$html : string
Return values
string

Filter HTML links for LISTCOMMON output

filterHTMLLinks(string $html) : string

This function is used only to remove links from a formatted resource when it is displayed inside a link because nested links are not supported by HTML.

Parameters
$html : string
Return values
string

escape()

Escape strings inserted in HTML

escape(mixed $value[, bool $force = FALSE ]) : mixed

If $value is not a string, return $value unchanged

NB: This function ignores the special case of backticks as attribute delimiters. IE is no longer supported.

Parameters
$value : mixed
$force : bool = FALSE

If true force escaping of allready escaped entities (Default if FALSE)

escapeHTMLTemp()

Temporarily escape HTML entities

escapeHTMLTemp(bool $protect, mixed $value) : mixed

If $value is not a string, return $value unchanged

This function is usually called twice. The first time ($protect = TRUE) will convert HTML entities. Presumably something is then done with the returned string, after which the function can be called with $protect = FALSE. The intention is to allow operations on a string that might interfere with or be interfered by any HTML entities in the string that are of type &...;

Parameters
$protect : bool
$value : mixed

_inlineHtmlAttribute()

Build a string for insertion of an HTML tag attribute.

_inlineHtmlAttribute([string $name = '' ][, string $value = '' ]) : string

Ensures that the attribute value is never empty (incorrect syntax)

Parameters
$name : string = ''

Default is ''

$value : string = ''

Default is ''

Return values
string

h()

<Hx> heading element

h([string $data = '' ][, string $class = '' ][, int $level = 4 ]) : string
Parameters
$data : string = ''

Default is ''

$class : string = ''

Default is ''

$level : int = 4

Default is 4

Return values
string

div()

<DIV> element

div(int $id[, string $data = '' ][, string $class = '' ]) : string

If no $data, then this is probably used in conjunction with AJAX to hide or unhide a page element

Parameters
$id : int
$data : string = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

divScrollable()

Scrollable <DIV> element

divScrollable(int $id[, string $data = '' ][, string $class = '' ][, int $width = 500 ][, int $height = 200 ]) : string

If no $data, then this is probably used in conjunction with AJAX to hide or unhide a page element

Parameters
$id : int
$data : string = ''

Default is ''

$class : string = ''

Default is ''

$width : int = 500

Default is 500px

$height : int = 200

Default is 200px

Return values
string

iframe()

<IFRAME> element

iframe(int $id[, string $data = '' ][, string $class = '' ]) : string

If no $data, then this is probably used in conjunction with AJAX to hide or unhide a page element

Parameters
$id : int
$data : string = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

p()

<P> element

p([string $data = '' ][, string $class = '' ][, string $align = 'left' ]) : string
Parameters
$data : string = ''

Default is ''

$class : string = ''

Default is ''

$align : string = 'left'

Default is 'left'

Return values
string

pBrowse()

<P> element

pBrowse([string $data = '' ][, string $class = '' ]) : string

for browsing creators, collections etc. (tag colour) where a background colour needs to be specified

Parameters
$data : string = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

pre()

<PRE> element

pre(mixed $data[, string $class = '' ]) : string
Parameters
$data : mixed
$class : string = ''

Default is ''

Return values
string

ul()

<UL> element

ul([string $data = '' ][, string $class = '' ]) : string
Parameters
$data : string = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

ol()

<OL> element

ol([string $data = '' ][, string $class = '' ]) : string
Parameters
$data : string = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

li()

<LI> element

li([string $data = '' ][, string $class = '' ]) : string
Parameters
$data : string = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

hr()

<HR> element

hr([string $class = '' ]) : string
Parameters
$class : string = ''

Default is ''

Return values
string

mark()

<mark> element

mark(string $data) : string
Parameters
$data : string
Return values
string

object()

<OBJECT> element For display attachment previews

object(string $data, string $type, int $width, int $height) : string
Parameters
$data : string
$type : string
$width : int
$height : int
Return values
string

span()

<SPAN> element

span([string $data = '' ][, string $class = '' ][, string $title = '' ][, string $js = '' ]) : string
Parameters
$data : string = ''

Default is ''

$class : string = ''

Default is ''

$title : string = ''

Default is ''

$js : string = ''

Default is ''

Return values
string

color()

<SPAN color> element

color([string $data = '' ][, string $class = 'blackText' ]) : string
Parameters
$data : string = ''

Default is ''

$class : string = 'blackText'

Default is 'blackText'

Return values
string

strong()

<STRONG> element (Semantic equivalent of <B>)

strong([string $data = '' ][, string $class = '' ]) : string
Parameters
$data : string = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

em()

<EM> element (Semantic equivalent of <I>)

em([string $data = '' ][, string $class = '' ]) : string
Parameters
$data : string = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

u()

<U> element

u(string $data[, string $class = '' ]) : string
Parameters
$data : string
$class : string = ''

Default is ''

Return values
string

img()

<IMG> element

img(string $src, int $width, int $height[, string $title = '' ][, string $alt = '' ][, string $js = '' ]) : string
Parameters
$src : string
$width : int
$height : int
$title : string = ''

Default is ''

$alt : string = ''

Default is ''

$js : string = ''

Default is ''

Return values
string

anchor()

<A> element used as internal anchor

anchor(string $name[, string $data = '' ][, string $title = '' ]) : string
Parameters
$name : string
$data : string = ''

Default is ''

$title : string = ''

Default is ''

Return values
string

a()

<A> element used as hyperlink

a(string $class, string $label, string $link[, string $target = '' ][, string $title = '' ]) : string
Parameters
$class : string
$label : string
$link : string
$target : string = ''

Default is ''

$title : string = ''

Default is ''

Return values
string

aBrowse()

<A> element used as hyperlink

aBrowse([string $color = '#000' ][, string $size = '1em' ][, string $label = '' ][, string $link = '' ][, string $target = '' ][, string $title = '' ][, string $js = '' ]) : string

Hyperlinks for browsing creators, collections etc. (tag clouds) where the text colour and size is provided by the scripts to indicate frequency

Parameters
$color : string = '#000'

Default is '#000'

$size : string = '1em'

Default is '1em'

$label : string = ''

Default is ''

$link : string = ''

Default is ''

$target : string = ''

Default is ''

$title : string = ''

Default is ''

$js : string = ''

Default is ''

Return values
string

tableStart()

Start a <TABLE> tag

tableStart([string $class = '' ]) : string
Parameters
$class : string = ''

Default is ''

Return values
string

tableEnd()

Close a <TABLE> tag

tableEnd() : string
Return values
string

tableCaption()

provide a table <caption>

tableCaption([string $caption = '' ][, string $class = '' ]) : string
Parameters
$caption : string = ''

Default is ''

$class : string = ''

Default is ''

Return values
string

tbodyStart()

Provide a <tbody> tag

tbodyStart([string $class = '' ]) : string
Parameters
$class : string = ''

Default is ''

Return values
string

tbodyEnd()

Provide a </tbody> tag

tbodyEnd() : string
Return values
string

theadStart()

Provde a <thead> tag

theadStart([string $class = '' ]) : string
Parameters
$class : string = ''

Default is ''

Return values
string

theadEnd()

Provide a </thead> tag

theadEnd() : string
Return values
string

tfootStart()

Provide a <tfoot> tag

tfootStart([string $class = '' ]) : string
Parameters
$class : string = ''

Default is ''

Return values
string

tfootEnd()

Provide a </tfoot> tag

tfootEnd() : string
Return values
string

trStart()

Provide a <tr> tag

trStart([string $class = '' ]) : string
Parameters
$class : string = ''

Default is ''

Return values
string

trEnd()

Provide a </tr> tag

trEnd() : string
Return values
string

tdStart()

Provide a <td> tag without closing it or encapsulating data

tdStart([string $class = '' ][, string $colspan = '' ]) : string
Parameters
$class : string = ''

Default is ''

$colspan : string = ''

Default is ''

Return values
string

tdEnd()

Provide a </td> tag

tdEnd() : string
Return values
string

td()

Provide a <td>...</td> tag

td([string $data = '' ][, string $class = '' ][, string $colspan = '' ]) : string
Parameters
$data : string = ''

Default is ''

$class : string = ''

Default is ''

$colspan : string = ''

Default is ''

Return values
string

thStart()

Provide a <th> tag without closing it or encapsulating data

thStart([string $class = '' ][, string $colspan = '' ]) : string
Parameters
$class : string = ''

Default is ''

$colspan : string = ''

Default is ''

Return values
string

thEnd()

Provide a </th> tag

thEnd() : string
Return values
string

th()

Provide a <th>...</th> tag

th([string $data = '' ][, string $class = '' ][, string $colspan = '' ]) : string
Parameters
$data : string = ''

Default is ''

$class : string = ''

Default is ''

$colspan : string = ''

Default is ''

Return values
string

cssInlineExternal()

Insert a call to an external CSS file

cssInlineExternal(string $url[, string $media = "all" ]) : string
Parameters
$url : string
$media : string = "all"

Default is 'all' (can be 'all' for all media, 'print' for printing, 'screen' for screens)

Tags
see
https://developer.mozilla.org/en-US/docs/Web/CSS/@media#media_types
Return values
string

jsInline()

Inlining JavaScript code

jsInline(string $jsCode[, string $execMode = "sync" ][, string $type = "" ]) : string
Parameters
$jsCode : string
$execMode : string = "sync"

When the script should be executed? Default is 'sync'

$type : string = ""

Script type? Default is ''

Tags
see
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
see
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

Execution modes:

  • 'sync' for sync loading and execution
  • 'async' for async loading and execution
  • 'defer' to defer execution until the DOM is fully parsed (not allowed on inlined scripts)

Script types:

  • '' for a regular JS script
  • 'module' for a JavaScript module
  • 'importmap' for an import map
Return values
string

jsInlineExternal()

Insert a call to an external javascript file

jsInlineExternal(string $url[, string $execMode = "sync" ][, string $type = "" ]) : string
Parameters
$url : string
$execMode : string = "sync"
$type : string = ""

Script type? Default is ''

Tags
see
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script
see
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

Execution modes:

  • 'sync' for sync loading and execution
  • 'async' for async loading and execution
  • 'defer' to defer execution until the DOM is fully parsed (not allowed on inlined scripts)

Script types:

  • '' for a regular JS script
  • 'module' for a JavaScript module
  • 'importmap' for an import map
Return values
string

successToast()

Format a text as a HTML success toast message (temporary info)

successToast(string $string) : string
Parameters
$string : string
Return values
string

errorToast()

Format a text as a HTML error toast message (temporary info)

errorToast(string $string) : string
Parameters
$string : string
Return values
string

nlToHtml()

replace newlines and carriage returns with appropriate HTML code.

nlToHtml(string $string) : string

first multiples then singles. Used for display back from DB table

Parameters
$string : string
Return values
string

htmlToNl()

replace HTML newlines and carriage returns with appropriate ANSI code.

htmlToNl(string $string) : string

first multiples then singles. Used for display back from DB table

Parameters
$string : string
Return values
string

removeNl()

remove all newlines.

removeNl(string $string) : string

For cases when user cut 'n' pastes multiple lines into single-line text box Used before writing to DB table

Parameters
$string : string
Return values
string

stripHtml()

Strip HTML from string

stripHtml(string $string) : string
Parameters
$string : string
Return values
string

clearSortField()

Strip HTML from string

clearSortField(string $string) : string
Parameters
$string : string
Return values
string

        
On this page

Search results