-
Notifications
You must be signed in to change notification settings - Fork 845
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
feat(keyboard): support for customize onKey events, original PR #2345 #2368
Conversation
@@ -123,6 +126,38 @@ class QuillRawEditorConfig { | |||
///``` | |||
final List<SpaceShortcutEvent> spaceShortcutEvents; | |||
|
|||
/// A handler for keys that are pressed when the editor is focused. | |||
/// | |||
/// ### Supported by: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: How about Supported Platforms
?
Or maybe remove this section entirely and mention that this feature is unsupported on mobile devices.
It would be slightly simpler and shorter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This suggestion is probably better, and even more understandable. Perhaps adding that it is not supported on mobile devices would make more sense.
/// To prevent the user from removing any **Embed Object**, try: | ||
/// | ||
///```dart | ||
///onKeyPressed: (event, node) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Space between the onKeyPressed
and the docs comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Space between the onKeyPressed and the docs comment.
It's purely a matter of visual taste. I prefer it this way. It's clear that in the end in Markdown this is irrelevant and will remove any spacing I put in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's though we have different tastes, and that makes the project docs style slightly inconsistent, I'm trying to use something that's commonly used in the project and known by most developers to make it easier to adapt.
This style is also quite common. It's used in Flutter (example code) and Dart (related Effective Dart section).
It's clear that in the end in Markdown this is irrelevant and will remove any spacing I put in.
It's irrelevant to the final result but not necessarily to the project code.
The if check code below has 3 spaces which might not make it formatted properly.
LGTM. |
Description
Note
See the original PR #2345, this branch is the same but pushed to this repo instead of the fork. Changes made by @CatHood0
Related Issues
Type of Change