idea-markdown icon indicating copy to clipboard operation
idea-markdown copied to clipboard

Preview tab unavailable in scratch files

Open wwboynton opened this issue 10 years ago • 3 comments

In rubymine 7.1.1, preview works as intended in .md files in the project filetree, but when I open a markdown scratch file it fails to show a preview tab.

  1. Tools> New Scratch File
  2. 'Markdown'
  3. No preview :(

wwboynton avatar May 14 '15 14:05 wwboynton

I am having this problem too.

CJ-Wright avatar Nov 05 '15 16:11 CJ-Wright

The issue is with the file type returned by scratch files. Regular files will have the markdown file type. Scratch files do not. To get the file type of the scratch file you need to request this information from the scratch file service. So idea-markdown does not recognize scratch files as markdown.

You can see the code I use in idea-multimarkdown plugin, which is an overhauled and enhanced version of idea-markdown. The code to handle this can be seen here: https://github.com/vsch/idea-multimarkdown/blob/master/src/main/java/com/vladsch/idea/multimarkdown/editor/MultiMarkdownPreviewEditorProvider.java#L58-L61

vsch avatar Nov 06 '15 04:11 vsch

Notice: This plugin is no more maintained and it has been removed from Jetbrains plugins repository. There is a Markdown plugin officially supported by Jetbrains.

nicoulaj avatar May 22 '16 11:05 nicoulaj