TextAction

data class TextAction(val highlight: String, val content: String, val type: ActionType)

TextAction, This object is used to add action to some part of a bigger text.

Constructors

Link copied to clipboard
constructor(highlight: String, content: String, type: ActionType)

Properties

Link copied to clipboard

for ActionType.LINK content is an url, for ActionType.POP_OVER the content is some text.

Link copied to clipboard

phrase or word to highlight.

Link copied to clipboard

either ActionType.LINK, ActionType.POP_OVER or ActionType.UNKNOWN. When type is ActionType.POP_OVER the content should be shown when the user clicks on or hover over the highlight phrase or word. When type is ActionType.LINK the content url should be open in a browser when the user clicks on the highlight phrase or word. When type is ActionType.UNKNOWN the TextAction should be ignored as there is an error in the data.