Namespaces

Namespaces

Marked

Methods


hasHeaders()

Determine if the document contains any headers for TOC

Source:
document.js
Returns:

{headers: true} if headers, False otherwise.

Type
json
Example
Marked.document.hasHeaders

highestHeaders()

Return an array consisting of the 2 highest header levels in the document

Source:
document.js
Returns:

Array of header elements

Type
array
Example
Marked.document.highestHeaders()

onComplete()

Bind panel interactions once spellcheck completes.

Source:
spellCheckDocument.js

onResults(results)

Render a spellcheck result row as each result arrives.

Parameters:
Name Type Description
results Object

Spellcheck result payload.

Source:
spellCheckDocument.js

Type Definitions


FindRunCallback(ok)

Parameters:
Name Type Description
ok boolean

True when a query was valid and search executed.

Source:
find.js

FindSearchState

Type:
  • Object
Properties:
Name Type Description
query string
regex boolean
caseSensitive boolean
wordsOnly boolean
Source:
find.js

SpeedReadToken

Type:
  • Object
Properties:
Name Type Argument Description
text string

Token text displayed in RSVP.

top number <optional>

Absolute document top offset for sync scrolling.

paragraphIndex number <optional>

Paragraph ordinal in source document.

paragraphStartIndex number <optional>

Token index where paragraph starts.

Source:
speedread.js

SplitTokenDisplay

Type:
  • Object
Properties:
Name Type Description
pre string

Characters before anchor letter.

anchor string

Anchor letter (ORP) character.

post string

Characters after anchor letter.

Source:
speedread.js