Class: UserTextMarkup
Defined in: Data/Models/User/UserTextMarkup.ts:43
User text markup entity from the user database. Represents any type of text markup (highlight, underline, strikethrough, etc.)
Colour storage (WS-7)
v1 stored one of six palette names; v2 stores hex #RRGGBB, matching
collection.color. This is live user data, so color accepts either —
it is typed string rather than HighlightColor for exactly that reason.
Use getColorHex for a canonical hex value and getColorName
when you need the palette swatch.
Word offsets (WS-5)
textStart / textEnd are 0-based inclusive word indices, which is the project-wide convention and was already true for this table.
Constructors
Constructor
new UserTextMarkup(
data):UserTextMarkup
Defined in: Data/Models/User/UserTextMarkup.ts:61
Parameters
data
color
string
Hex #RRGGBB (v2) or a palette name (v1).
createdDate?
string
markupId?
number
metadata?
moduleId
number
noteId?
number
textEnd?
number
textStart?
number
verseIdEnd?
number
verseIdStart
number
Returns
UserTextMarkup
Properties
color
color:
string
Defined in: Data/Models/User/UserTextMarkup.ts:56
Primary colour. v2 writes hex #RRGGBB; v1 rows still hold a palette name.
Read through getColorHex / getColorName.
createdDate?
optionalcreatedDate?:string
Defined in: Data/Models/User/UserTextMarkup.ts:58
markupId?
optionalmarkupId?:number
Defined in: Data/Models/User/UserTextMarkup.ts:44
metadata?
optionalmetadata?:TextMarkupMetadata
Defined in: Data/Models/User/UserTextMarkup.ts:59
moduleId
moduleId:
number
Defined in: Data/Models/User/UserTextMarkup.ts:45
noteId?
optionalnoteId?:number
Defined in: Data/Models/User/UserTextMarkup.ts:57
textEnd?
optionaltextEnd?:number
Defined in: Data/Models/User/UserTextMarkup.ts:51
Last word covered. 0-based, inclusive.
textStart?
optionaltextStart?:number
Defined in: Data/Models/User/UserTextMarkup.ts:49
First word covered. 0-based, inclusive.
verseIdEnd?
optionalverseIdEnd?:number
Defined in: Data/Models/User/UserTextMarkup.ts:47
verseIdStart
verseIdStart:
number
Defined in: Data/Models/User/UserTextMarkup.ts:46
Methods
coversVerse()
coversVerse(
verseId):boolean
Defined in: Data/Models/User/UserTextMarkup.ts:179
Check if a specific verse is covered by this highlight
Parameters
verseId
number
Returns
boolean
getColorHex()
getColorHex():
string
Defined in: Data/Models/User/UserTextMarkup.ts:141
Canonical #RRGGBB for this markup, resolving a v1 palette name if needed.
Returns
string
getColorName()
getColorName():
HighlightColor|undefined
Defined in: Data/Models/User/UserTextMarkup.ts:149
The palette swatch name, when the colour is one of the six. Returns undefined for a custom colour — fall back to getColorHex.
Returns
HighlightColor | undefined
getMarkupType()
getMarkupType():
"highlight"|"underline"|"both"
Defined in: Data/Models/User/UserTextMarkup.ts:127
Get markup type (default: 'highlight')
Returns
"highlight" | "underline" | "both"
getUnderlineColor()
getUnderlineColor():
string
Defined in: Data/Models/User/UserTextMarkup.ts:156
Get underline color (default: same as highlight color), as canonical hex.
Returns
string
getUnderlineStyle()
getUnderlineStyle():
"solid"|"wavy"|"dotted"|"dashed"
Defined in: Data/Models/User/UserTextMarkup.ts:134
Get underline style (default: 'solid')
Returns
"solid" | "wavy" | "dotted" | "dashed"
getVerseRange()
getVerseRange():
object
Defined in: Data/Models/User/UserTextMarkup.ts:117
Get the verse range
Returns
object
end
end:
number
start
start:
number
getWordRangeForVerse()
getWordRangeForVerse(
verseId): {end:number|null;start:number; } |null
Defined in: Data/Models/User/UserTextMarkup.ts:189
Get word range for a specific verse within this highlight Returns null if verse is not covered
Parameters
verseId
number
Returns
{ end: number | null; start: number; } | null
hasHighlight()
hasHighlight():
boolean
Defined in: Data/Models/User/UserTextMarkup.ts:163
Check if this highlight includes highlighting (background color)
Returns
boolean
hasNote()
hasNote():
boolean
Defined in: Data/Models/User/UserTextMarkup.ts:110
Check if this highlight has an associated note
Returns
boolean
hasUnderline()
hasUnderline():
boolean
Defined in: Data/Models/User/UserTextMarkup.ts:171
Check if this highlight includes underlining
Returns
boolean
isMultiVerse()
isMultiVerse():
boolean
Defined in: Data/Models/User/UserTextMarkup.ts:96
Check if this is a multi-verse highlight
Returns
boolean
isPartialText()
isPartialText():
boolean
Defined in: Data/Models/User/UserTextMarkup.ts:103
Check if this is a partial text highlight (not whole verses)
Returns
boolean
isSingleVerse()
isSingleVerse():
boolean
Defined in: Data/Models/User/UserTextMarkup.ts:89
Check if this is a single verse highlight
Returns
boolean