How to add an inline input field to editor?
Answered
How to add an inline input field to editor? Between two lines of code, not an input dialog.
Thank you very much for any help!
Please sign in to leave a comment.
Hi,
You can use Component Inlay API:
https://github.com/JetBrains/intellij-community/blob/master/platform/platform-impl/src/com/intellij/openapi/editor/ComponentInlay.kt
Please note that this API is experimental and may change in the future without preserving backward compatibility.
Also, if you decide to use it, please note that when your component is added to the editor, all actions executed in your component will be executed in the hosting editor.
For example, using up/down/left/right arrows, your component will move caret out of the component to the editor. This can be prevented by implementing DataProvider by your component and wrapping it into
TextComponentEditorImplin case the editor data is requested: