2017-04-12 by Vladimir Schneider

Using Markdown to Generate HTML for Your Plugin's Description

IntelliJ plugin description stored in plugin.xml file uses HTML which is eventually displayed by the Swing browser. Swing limitations make it difficult to accurately predict the rendering of the final result. Markdown Navigator can be used to help with both generating the HTML from Markdown and also to give a fair rendering representation.

Defining a scope that includes the plugin markdown description will allow you to control the rendering profile and export settings strictly for the description file without affecting other markdown documents in the project.

For example, if plugin description is stored in the assets/markdown/plugin-description.md file then:

  1. Create a scope that includes the parent directory or just the file:

  2. Create a profile:

  3. Since you will be using generated HTML you can enable all Markdown element extensions:

  4. Un-check the Add page header option:

  5. Now define the export options:

    The file will be exported to the same directory with a .html extension.

  6. Assign it to this scope:

Now you can edit the markdown plugin description and see the result in the preview. Saving the file will automatically export the HTML.

<img src="https://raw.githubusercontent.com/vsch/PluginDevelopersToolbox/master/assets/images/ScreenShot_sequence_1x.png" border="0" width="414" height="155" alt="Screenshot">

For now only one very useful function: [Slicy](http://www.macrabbit.com/slicy) file

**Plugin website:
[Plugin Developer's Toolbox GitHub Repo](http://github.com/vsch/PluginDevelopersToolbox)**

**Bug tracking & feature requests:
[Plugin Developer's Toolbox GitHub Issues](https://github.com/vsch/PluginDevelopersToolbox/issues)**

Preview of the above:

After saving all files you can open the plugin-description.html file:

<p><img src="https://raw.githubusercontent.com/vsch/PluginDevelopersToolbox/master/assets/images/ScreenShot_sequence_1x.png" border="0" width="414" height="155" alt="Screenshot"></p>
<p>For now only one very useful function: <a href="http://www.macrabbit.com/slicy">Slicy</a> file
<p><strong>Plugin website:
<a href="http://github.com/vsch/PluginDevelopersToolbox">Plugin Developer&rsquo;s Toolbox GitHub Repo</a></strong></p>
<p><strong>Bug tracking &amp; feature requests:
<a href="https://github.com/vsch/PluginDevelopersToolbox/issues">Plugin Developer&rsquo;s Toolbox GitHub Issues</a></strong></p>

Enabling preview for HTML documents will allow you to preview the raw HTML file:

Which will show the preview for the HTML:

All you need to do manually is to copy the HTML into the plugin.xml file.

The description for the installed plugin will look like:

Now you can edit the description in Markdown, see the preview and generate the HTML when done. The only thing to remember is to copy the generated HTML to the plugin.xml.


Constructive comments and suggestions are welcome. I can also be reached me at vladimir@vladsch.com