\RICHTEXTFORMAT

RTF encoding

NB - this produces just the bare minimum of RTF code to work in Word and OO.org

Summary

Methods
Properties
Constants
parseSpan()
parseLists()
__construct()
header()
footer()
parse()
formatText()
closeListTable()
createFancyUrl()
createfonttbl()
setFontBlock()
imageCallback()
paraCallback()
paraStyle()
utf8_2_rtfansicpg1252()
$fontIndex
$fontBlocks
$fonttbl
$fontBlock
$colourTable
$colourArray
$lineSpacing
$listTable
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$fontIndex

$fontIndex : 

sint

Type

$fontBlocks

$fontBlocks : 

array

Type

$fonttbl

$fonttbl : 

array

Type

$fontBlock

$fontBlock : 

string

Type

$colourTable

$colourTable : 

string

Type

$colourArray

$colourArray : 

array

default black font and blue for hyperlinks

Type

$lineSpacing

$lineSpacing : 

string

Type

$listTable

$listTable : 

string

Type

Methods

parseSpan()

parseSpan(  text, mixed||string|int  callbackStyle) : 

parse <span>...</span>

Parameters

text
mixed||string|int callbackStyle

Returns

parseLists()

parseLists(  text,   callbackUnorderedList,   callbackOrderedList) : 

Create lists

Parameters

text
callbackUnorderedList
callbackOrderedList

Returns

__construct()

__construct() : 

RICHTEXTFORMAT

Returns

header()

header() : 

Set some defaults and create the RTF opening tag

Returns

footer()

footer() : 

Create the RTF closing tag

Returns

parse()

parse( text) : 

parse tinyMCE code to RTF tags

Parameters

text

Returns

parsed text

formatText()

formatText(  text,   protectCurlyBracket = TRUE) : 

Format text for HTML characters

Parameters

text
protectCurlyBracket

Returns

closeListTable()

closeListTable() : 

Close the list table and append the listOverrideTable string

Returns

createFancyUrl()

createFancyUrl(  text) : 

Create fancy url hyperlinks

Parameters

text

Returns

createfonttbl()

createfonttbl(  font) : 

Set font types and create top level font blocks

Parameters

font

Returns

Font index

setFontBlock()

setFontBlock(  font) : 

Set font blocks

Parameters

font

Returns

Font index

imageCallback()

imageCallback(mixed||string|int  matchArray) : 

Read an image from either file or URL

Parameters

mixed||string|int matchArray

Returns

paraCallback()

paraCallback(mixed||string|int  match) : 

callback for HTML style elements of <P>

Parameters

mixed||string|int match

Returns

paraStyle()

paraStyle(  param,   text) : 

deal with <P> parameters

Parameters

param
text

Returns

utf8_2_rtfansicpg1252()

utf8_2_rtfansicpg1252(  string) : 

UTF-8 to ANSI Windows 1252 strings for RTF only

returns a string encoded accordingly to Rich Text Format (RTF) Specification Version 1.9.1 https://www.microsoft.com/en-us/download/details.aspx?id=10725

Parameters

string

UTF-8 encoded string

Returns

plain ASCII with RTF specific sequences for others characters