Highlighter provides a view/model/update to display a view to highlight text.
Currently, highlighter is used in the following places:
staging.noredink.com/admin/grammar_questions/types)Messages used by highlighter when interacting with a mouse or finger.
Setup initial model
Update for highlighter returning additional info about whether there was a change
Same as view, but will render strings like "blah" inside of emphasis tags.
WARNING: the version of markdown used here is extremely limited, as the highlighter content needs to be entirely in-line content. Lists & other block-level elements will not render as they usually would!
WARNING: markdown is rendered highlightable by highlightable, so be sure to provide highlightables like ["New York Times"]["New York Times"], NOT like ["New ", "York ", "Times"]["New ", "York ", "Times"]
Same as static, but will render strings like "blah" inside of emphasis tags.
WARNING: the version of markdown used here is extremely limited, as the highlighter content needs to be entirely in-line content. Lists & other block-level elements will not render as they usually would!
WARNING: markdown is rendered highlightable by highlightable, so be sure to provide highlightables like ["New York Times"]["New York Times"], NOT like ["New ", "York ", "Times"]["New ", "York ", "Times"]
Same as staticWithTags, but will render strings like "blah" inside of emphasis tags.
WARNING: the version of markdown used here is extremely limited, as the highlighter content needs to be entirely in-line content. Lists & other block-level elements will not render as they usually would!
WARNING: markdown is rendered highlightable by highlightable, so be sure to provide highlightables like ["New York Times"]["New York Times"], NOT like ["New ", "York ", "Times"]["New ", "York ", "Times"]
Possible intents or "external effects" that the Highlighter can request (see perform).
Check if the highlighter has changed.
Get a list of fragment texts and whether or not they are marked. Useful for encoding answers.
Get unique markers that have been used.
Fetch the text from a series of highlightables.
TODO: Add documentation about how to wire in event listeners and subscriptions so the highlighter is functional!
Model of a highlighter