messageEntityDiffReplace #

Represents an diff replacement, render it as follows:

  • Insert old_text into the text at offset offset, underline it and color it in red: note that this insertion does not affect the offsets of entities that come after it.
  • underline the section delimited by offset and limit and color it in green.

See here » for more info on how to render diff entities.

Layer 223

Constructor schema is available as of layer 224. Switch »

Parameters #

NameTypeDescription
offsetintOffset of message entity within message (in UTF-16 code units)
lengthintLength of message entity within message (in UTF-16 code units)
old_textstringThe chunk of text that was removed.

Type #

MessageEntity

Styled text with message entities #

How to create styled text with message entities