Type Alias: createTextAdapterParams
@ghentcdh/annotated-text / createTextAdapterParams
Type Alias: createTextAdapterParams
createTextAdapterParams =
object
Defined in: libs/core/src/lib/adapter/text/TextAdapter.ts:124
Properties
flatText?
optionalflatText:boolean
Defined in: libs/core/src/lib/adapter/text/TextAdapter.ts:136
If true, the adapter will return flat text instead of HTML. This is useful for plain text processing or when HTML formatting is not needed. Defaults to false.
limit?
optionallimit:Limit|null
Defined in: libs/core/src/lib/adapter/text/TextAdapter.ts:141
Defines the range of positions in the text that the adapter should consider. Each lines that intersects with this range will be included in the output.
style?
optionalstyle:Partial<Omit<TextAdapterStyle,"lineHeight">>
Defined in: libs/core/src/lib/adapter/text/TextAdapter.ts:165
textDirection?
optionaltextDirection:TextDirection
Defined in: libs/core/src/lib/adapter/text/TextAdapter.ts:130
The text direction for the adapter. Can be either 'ltr' (left-to-right) or 'rtl' (right-to-left). Defaults to 'ltr'.
textOffset?
optionaltextOffset:number
Defined in: libs/core/src/lib/adapter/text/TextAdapter.ts:163
Custom offset for text character indexing.
By default, text uses zero-based indexing (starting at 0), which is standard in programming. However, many scholarly and editorial workflows reference text positions starting from 1. This option allows you to configure the starting index to match your workflow.
Default
0Examples
// Zero-based indexing (default, programming standard)
textOffset: 0 // First character is at position 0// One-based indexing (scholarly/editorial standard)
textOffset: 1 // First character is at position 1// Custom offset (e.g., continuing from a previous section)
textOffset: 100 // First character is at position 100