mb21 / panwriter

Markdown editor with pandoc integration and paginated preview.
https://PanWriter.com
GNU General Public License v3.0
1.03k stars 49 forks source link

Render HTML in Markdown Preview #59

Open markadrake opened 3 years ago

markadrake commented 3 years ago

From what I can tell, PanWriter uses the following package to provide the preview pane to markdown files.

https://github.com/markdown-it/markdown-it#markdown-it

There is an option that can be toggled to true that allows HTML to be rendered.

Perhaps we could have a settings dialog to manage some of the default properties?

The latest version, running on Mac, doesn't seem to support it.

Here is my markdown:

image

The preview:

image

mb21 commented 3 years ago

I think I want to keep the default to not support inline HTML in the preview. Because HTML is only one output format when exporting with pandoc, and it won't be included when you export e.g. to Word or LaTeX. But yes, we could add an option...

But what you seem try to do is simply have a table with borders? Try:

| foo | bar |
| --- | --- |
| baz | bim |

or:

---
header-includes: |-
  <style>
  th, td {
    border: 1px solid black;
  }
  </style>
---

| foo | bar |
| --- | --- |
| baz | bim |