TextWatcher (mention)
@ckeditor/ckeditor5-mention/src/textwatcher
Filtering
Properties
-
The last matched text.
Methods
-
constructor( editor, testCallback, textMatcherCallback )Creates a text watcher instance.
Parameters
editor : EditortestCallback : functionThe function used to match the text.
textMatcherCallback : functionThe function used to process matched text.
-
_evaluateTextBeforeSelection()private
Checks the editor content for matched text.
-
_getText() → String | undefinedprivate
Returns the text before the caret from the current selection block.
Returns
String | undefinedThe text from the block or undefined if the selection is not collapsed.
-
_startListening()private
Starts listening to the editor for typing and selection events.
Events
-
matched( eventInfo )Fired whenever the text watcher found a match.
Parameters
eventInfo : EventInfoAn object containing information about the fired event.
-
unmatched( eventInfo )Fired whenever the text does not match anymore. Fired only when the text watcher found a match.
Parameters
eventInfo : EventInfoAn object containing information about the fired event.