vue-mark-text

Highlight/mark text. Supply text along with "marks", objects with begChar, endChar, text, and cls, where begChar/endChar are character indices in the text. The library will split the text into span batches of spans with the cls applied and automatically handle overlap by merging classes. A controller may also be supplied to catch the events from clicking on the text spans and trigger callback. By default, NullController has no callback.

MarkedText is used like:

<MarkedText id="mt" :sourceText="sourceText" :marks="marks" :controller="controller"/>

Example