class Html (View source)

Properties

static protected $colourMap
protected $face
protected $size
protected $color
protected $bold
protected $italic
protected $underline
protected $superscript
protected $subscript
protected $strikethrough
protected $startTagCallbacks
protected $endTagCallbacks
protected $stack
protected $stringData
protected RichText $richTextObject

Methods

initialise()

No description

toRichTextObject(string $html)

Parse HTML formatting and return the resulting RichText.

cleanWhitespace()

No description

buildTextRun()

No description

rgbToColour($rgb)

No description

colourNameLookup($rgb)

No description

startFontTag($tag)

No description

endFontTag()

No description

startBoldTag()

No description

endBoldTag()

No description

startItalicTag()

No description

endItalicTag()

No description

startUnderlineTag()

No description

endUnderlineTag()

No description

startSubscriptTag()

No description

endSubscriptTag()

No description

startSuperscriptTag()

No description

endSuperscriptTag()

No description

startStrikethruTag()

No description

endStrikethruTag()

No description

breakTag()

No description

parseTextNode(DOMText $textNode)

No description

handleCallback(DOMElement $element, string $callbackTag, array $callbacks)

No description

parseElementNode(DOMElement $element)

No description

parseElements(DOMNode $element)

No description

Details

protected initialise()

RichText toRichTextObject(string $html)

Parse HTML formatting and return the resulting RichText.

Parameters

string $html

Return Value

RichText

protected cleanWhitespace()

protected buildTextRun()

protected rgbToColour($rgb)

Parameters

$rgb

protected colourNameLookup($rgb)

Parameters

$rgb

protected startFontTag($tag)

Parameters

$tag

protected endFontTag()

protected startBoldTag()

protected endBoldTag()

protected startItalicTag()

protected endItalicTag()

protected startUnderlineTag()

protected endUnderlineTag()

protected startSubscriptTag()

protected endSubscriptTag()

protected startSuperscriptTag()

protected endSuperscriptTag()

protected startStrikethruTag()

protected endStrikethruTag()

protected breakTag()

protected parseTextNode(DOMText $textNode)

Parameters

DOMText $textNode

protected handleCallback(DOMElement $element, string $callbackTag, array $callbacks)

Parameters

DOMElement $element
string $callbackTag
array $callbacks

protected parseElementNode(DOMElement $element)

Parameters

DOMElement $element

protected parseElements(DOMNode $element)

Parameters

DOMNode $element