How to modify text of empty file editor window through plugin

Answered

Hi 

 

when all files are closed , a default empty file editor shows up in intellij idea 

it has the text 
Search Everywhere
Project View
Go To File
Recent Files
Navigation Bar
Drop files here to open 

I have a custom action working fine now.
when the action is performed , can i change the text of the empty file editor ?


0
3 comments

Hi Karan,

This is painted by com.intellij.openapi.fileEditor.impl.EditorEmptyTextPainter. There is no open API for changing this and it is not recommended to do this in a hacky way, as it is a core IDE feature and changing it could destroy user experience.

What is your use case. Why do you want to change it?

0

thanks for answering 

actually sir 

I wish to open markdown file editor when a custom action is clicked 

the markdown editor should have a preview mode as well .

i have seen the readme.md preview is shown in the center .

maybe i need to use the editor for markdown and try to have a tool window for the preview of the markdown.

 

 

0

I'm not sure I understand what you want to achieve.

Markdown support and the preview of Markdown file are available in IDEs out-of-the-box.

You can open a Markdown file programmatically with com.intellij.openapi.fileEditor.OpenFileDescriptor.

0

Please sign in to leave a comment.