View Issue Details

IDProjectCategoryView StatusLast Update
0027906mantisbtattachmentspublic2021-01-25 17:37
Reporterrogueresearch Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version2.24.4 
Summary0027906: Support inline preview of .md attachments as rendered markdown, not plain text
Description

Mantis is currently able to show inline previews of .md files as plain text. Which is great.

But since mantis already has the ability to render markdown, perhaps the inline display of .md attachments could be rendered as markdown, instead of as plain text.

I've attached a random markdown file here to illustrate.

TagsNo tags attached.

Activities

rogueresearch

rogueresearch

2021-01-22 12:58

reporter  

test.md (1,182 bytes)   
# Markdown syntax guide

## Headers

# This is a Heading h1
## This is a Heading h2 
###### This is a Heading h6

## Emphasis

*This text will be italic*  
_This will also be italic_

**This text will be bold**  
__This will also be bold__

_You **can** combine them_

## Lists

### Unordered

* Item 1
* Item 2
* Item 2a
* Item 2b

### Ordered

1. Item 1
1. Item 2
1. Item 3
  1. Item 3a
  1. Item 3b

## Images

![This is a alt text.](/image/sample.png "This is a sample image.")

## Links

You may be using [Markdown Live Preview](https://markdownlivepreview.com/).

## Blockquotes

> Markdown is a lightweight markup language with plain-text-formatting syntax, created in 2004 by John Gruber with Aaron Swartz.
>
>> Markdown is often used to format readme files, for writing messages in online discussion forums, and to create rich text using a plain text editor.

## Tables

| Left columns  | Right columns |
| ------------- |:-------------:|
| left foo      | right foo     |
| left bar      | right bar     |
| left baz      | right baz     |

## Blocks of code

```
let message = 'Hello world';
alert(message);
```

## Inline code

This web site is using `markedjs/marked`.
test.md (1,182 bytes)   
atrol

atrol

2021-01-25 17:37

developer   ~0065035

Last edited: 2021-01-25 17:37

Just some thoughts in case someone should start working on this.

Markdown rendering is not supported by browsers, thus we can't implement it similar to the existing Audio or Video preview.

Markdown is not standardized, but comes in different flavors, e.g. GitHub Flavored Markdown.
The flavors can't be distinguished by the file extension.
Using the same renderer for different flavors might produce confusing results, but might be good enough.

We should not loose the functionality to copy / paste the plain text of the attached file.
Offering the preview just on demand or in addition to the plain text in a separate text area would solve it.