Instrument keyboard shortcuts and input rules in the Content Editor
What does this MR do?
This change is behind a feature flag. It instruments the execution of keyboard shortcuts and input rules in the Content Editor.
How to test?
- Enable the
:wiki_content_editor
feature flag. - Edit a wiki page and click the use new editor button.
- Creating a heading using an input rule. An input rule uses Markdown syntax to create an element in the Content Editor. Type
## Heading
and a lvl 2 heading will be created: - Create a second heading using the keyboard shortcut
Cmd Alt 2
. - You should see two structured events with the following information
Input rule | Keyboard shortcut |
---|---|
Relevant documentation
I recommend reading these sections of Tiptap and ProseMirror’s documentation to understand the APIs used by this MR:
- Customizing keyboard shortcuts and input rules in Tiptap
- Prosemirror input rules package
- someProp method
Screenshots (strongly suggested)
[No user-facing changes]
Does this MR meet the acceptance criteria?
Conformity
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because this change is behind a feature flag.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Related to #329650 (closed)
Edited by Enrique Alcántara