Nutrient Web SDK

ReferenceEnableRichTextCallback

Type Alias EnableRichTextCallback

This call back defines which text annotations should be treated as rich text annotation. By default, all the text annotations are treated as plain text annotations, which means that when you edit them, you will see the plain text editor. You can change this behavior by returning true for the text annotations that you want to be treated as rich text annotations.

For more information, see Configuration#enableRichText.

Type Alias
Type Signature
type EnableRichTextCallback = (annotation: NutrientViewer.Annotations.TextAnnotation) => boolean

Example

Only treat newly created annotations as rich text annotations

NutrientViewer.load({
enableRichText: annotation => annotation.pageIndex === null
// ...
});

Type Declaration

Parameters

The text annotation.

Returns

boolean