Need help with choosing the right text editor component
Answered
In my plugin I need to have an editor component similar to the default one in IntelliJ. What I need is syntax highlighting, line numbers and support for different types, e.g. XML, JSON, etc. I will not have any virtual files or psi files associated with this editor component, i.e. I will only let user type or paste the text into that editor - so I cannot use the existing PsiAwareTextEditorImpl. I tried to use EditorTextField, e.g.:
EditorTextField textField = new EditorTextField();
textField.setFileType(StdFileTypes.XML);
but it looks just like plain text area, no formatting, no scrolling, no line numbers. So I'm wondering if there's anything better out there?
Please sign in to leave a comment.
Nevermind, I found the answer here in one of the previous posts. Now my code works just fine. For those who are interested, this is what my solution looks like: