-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add editor hook to listen for entered text #367
Comments
The current hooks the editor exposes for reacting to use key- and text- related events are:
|
After thinking it over, there are two distinct (though related) concerns — reacting to text the user typed and a key-combination the user pressed. Specifying whether to trigger on key-up or -down only applies to key-combos, and options like To address the use case described in this issue I'm going to change the text expansion hooks in the editor to be more flexible. They can be updated to make the E.g.:
cc @rlivsey let me know if this makes sense to you |
Deprecate `Editor#registerTextExpansion` in favor of `onTextInput` Fixes #367
Deprecate `Editor#registerTextExpansion` in favor of `onTextInput` Fixes #367
@bantic looks great to me! |
Deprecate `Editor#registerTextExpansion` in favor of `onTextInput` Fixes #367
Deprecate `Editor#registerTextExpansion` in favor of `onTextInput` Fixes #367
In order to implement something like a system where typing "@" triggers an editor event that a consumer can listen to and then later replace with an atom (to represent that @-mention in some semantic/metadata-y sense).
The sort of flexible input configuration that Mousetrap uses seems like a good path.
This system should handle:
In the callback the following information should be available:
editor.range
)editor
The text was updated successfully, but these errors were encountered: