Redmine Markdown



Overview

Nearly all Markdown applications support the basic syntax outlined in John Gruber’s original design document. There are minor variations and discrepancies between Markdown processors — those are noted inline wherever possible.

How to add line breaks to Redmine markdown in code highlighting? Ask Question Asked 1 year, 4 months ago. Active 1 year, 4 months ago. And while the Redmine guide above says code highlighting relies on Rouge, my version of Redmine uses CodeRay, whose website examples handle line breaks perfectly.

Headings

A powerful online table generator and editor that converts between csv, html and markdown. Easy to convert html tables to sql, json, xml, excel, latex tables and text, making the table easier to use. Markdown HTML Textile Jira. PuppyPaste is a side-project of Alex Dergachev who's currently using it to copy meeting notes from Gmail to Redmine as part of his. Just recently became a Redmine user/administrator. Started with 2.4.2, but upgrading to 2.5.0 yesterday once I learned about the new Markdown support in the core: #15520. This plugin replaced the default Redmine formatter with the Markdown formatter, which uses the Redcarpet library. This is the same library that is used by Github. Therefore the syntax provided with the Redcarpet plugin is compatible with Github's Markdown syntax. If you asked what formatter I recommend, I would answer Textile.

To create a heading, add number signs (#) in front of a word or phrase. The number of number signs you use should correspond to the heading level. For example, to create a heading level three (<h3>), use three number signs (e.g., ### My Header).

MarkdownHTMLRendered Output
# Heading level 1<h1>Heading level 1</h1>
## Heading level 2<h2>Heading level 2</h2>

Heading level 2

### Heading level 3<h3>Heading level 3</h3>

Heading level 3

#### Heading level 4<h4>Heading level 4</h4>

Heading level 4

##### Heading level 5<h5>Heading level 5</h5>
Heading level 5
###### Heading level 6<h6>Heading level 6</h6>
Heading level 6

Alternate Syntax

Alternatively, on the line below the text, add any number of characters for heading level 1 or -- characters for heading level 2.

MarkdownHTMLRendered Output
Heading level 1
<h1>Heading level 1</h1>
Heading level 2
---------------
<h2>Heading level 2</h2>

Heading level 2

Heading Best Practices

Markdown applications don’t agree on how to handle a missing space between the number signs (#) and the heading name. For compatibility, always put a space between the number signs and the heading name.

✅ Do this❌ Don't do this
# Here's a Heading
#Here's a Heading

Paragraphs

To create paragraphs, use a blank line to separate one or more lines of text.

MarkdownHTMLRendered Output
I really like using Markdown.
I think I'll use it to format all of my documents from now on.
<p>I really like using Markdown.</p>
<p>I think I'll use it to format all of my documents from now on.</p>

I really like using Markdown.

I think I'll use it to format all of my documents from now on.

Paragraph Best Practices

Unless the paragraph is in a list, don’t indent paragraphs with spaces or tabs.

✅ Do this❌ Don't do this
Don't put tabs or spaces in front of your paragraphs.
Keep lines left-aligned like this.
This can result in unexpected formatting problems.
Don't add tabs or spaces in front of paragraphs.

Line Breaks

To create a line break (<br>), end a line with two or more spaces, and then type return.

MarkdownHTMLRendered Output
This is the first line.
And this is the second line.
<p>This is the first line.<br>
And this is the second line.</p>

This is the first line.
And this is the second line.

Line Break Best Practices

You can use two or more spaces (commonly referred to as “trailing whitespace”) for line breaks in nearly every Markdown application, but it’s controversial. It’s hard to see trailing whitespace in an editor, and many people accidentally or intentionally put two spaces after every sentence. For this reason, you may want to use something other than trailing whitespace for line breaks. Fortunately, there is another option supported by nearly every Markdown application: the <br> HTML tag.

For compatibility, use trailing white space or the <br> HTML tag at the end of the line.

There are two other options I don’t recommend using. CommonMark and a few other lightweight markup languages let you type a backslash () at the end of the line, but not all Markdown applications support this, so it isn’t a great option from a compatibility perspective. And at least a couple lightweight markup languages don’t require anything at the end of the line — just type return and they’ll create a line break.

✅ Do this❌ Don't do this
First line with two spaces after.
And the next line.
First line with the HTML tag after.<br>
And the next line.
First line with a backslash after.
And the next line.
First line with nothing after.
And the next line.

Emphasis

You can add emphasis by making text bold or italic.

Redmine Markdown

Bold

To bold text, add two asterisks or underscores before and after a word or phrase. To bold the middle of a word for emphasis, add two asterisks without spaces around the letters.

MarkdownHTMLRendered Output
I just love **bold text**.I just love <strong>bold text</strong>.I just love bold text.
I just love __bold text__.I just love <strong>bold text</strong>.I just love bold text.
Love**is**boldLove<strong>is</strong>boldLoveisbold

Bold Best Practices

Markdown applications don’t agree on how to handle underscores in the middle of a word. For compatibility, use asterisks to bold the middle of a word for emphasis.

✅ Do this❌ Don't do this
Love**is**bold Love__is__bold

Italic

To italicize text, add one asterisk or underscore before and after a word or phrase. To italicize the middle of a word for emphasis, add one asterisk without spaces around the letters.

MarkdownHTMLRendered Output
Italicized text is the *cat's meow*.Italicized text is the <em>cat's meow</em>.Italicized text is the cat’s meow.
Italicized text is the _cat's meow_.Italicized text is the <em>cat's meow</em>.Italicized text is the cat’s meow.
A*cat*meowA<em>cat</em>meowAcatmeow

Italic Best Practices

Markdown applications don’t agree on how to handle underscores in the middle of a word. For compatibility, use asterisks to italicize the middle of a word for emphasis.

✅ Do this❌ Don't do this
A*cat*meow A_cat_meow

Bold and Italic

To emphasize text with bold and italics at the same time, add three asterisks or underscores before and after a word or phrase. To bold and italicize the middle of a word for emphasis, add three asterisks without spaces around the letters.

MarkdownHTMLRendered Output
This text is ***really important***.This text is <strong><em>really important</em></strong>.This text is really important.
This text is ___really important___.This text is <strong><em>really important</em></strong>.This text is really important.
This text is __*really important*__.This text is <strong><em>really important</em></strong>.This text is really important.
This text is **_really important_**.This text is <strong><em>really important</em></strong>.This text is really important.
This is really***very***important text.This is really<strong><em>very</em></strong>important text.This is reallyveryimportant text.

Bold and Italic Best Practices

Markdown applications don’t agree on how to handle underscores in the middle of a word. For compatibility, use asterisks to bold and italicize the middle of a word for emphasis.

✅ Do this❌ Don't do this
This is really***very***important text. This is really___very___important text.

Blockquotes

To create a blockquote, add a > in front of a paragraph.

The rendered output looks like this:

Dorothy followed her through many of the beautiful rooms in her castle.

Blockquotes with Multiple Paragraphs

Blockquotes can contain multiple paragraphs. Add a > on the blank lines between the paragraphs.

The rendered output looks like this:

Dorothy followed her through many of the beautiful rooms in her castle.

The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.

Nested Blockquotes

Blockquotes can be nested. Add a >> in front of the paragraph you want to nest.

The rendered output looks like this:

Dorothy followed her through many of the beautiful rooms in her castle.

The Witch bade her clean the pots and kettles and sweep the floor and keep the fire fed with wood.

Blockquotes with Other Elements

Blockquotes can contain other Markdown formatted elements. Not all elements can be used — you’ll need to experiment to see which ones work.

The rendered output looks like this:

The quarterly results look great!

  • Revenue was off the chart.
  • Profits were higher than ever.

Everything is going according to plan.

Lists

You can organize items into ordered and unordered lists.

Ordered Lists

To create an ordered list, add line items with numbers followed by periods. The numbers don’t have to be in numerical order, but the list should start with the number one.

MarkdownHTMLRendered Output
1. First item
2. Second item
3. Third item
4. Fourth item
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ol>
  1. First item
  2. Second item
  3. Third item
  4. Fourth item
1. First item
1. Second item
1. Third item
1. Fourth item
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ol>
  1. First item
  2. Second item
  3. Third item
  4. Fourth item
1. First item
8. Second item
3. Third item
5. Fourth item
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ol>
  1. First item
  2. Second item
  3. Third item
  4. Fourth item
1. First item
2. Second item
3. Third item
1. Indented item
2. Indented item
4. Fourth item
<ol>
<li>First item</li>
<li>Second item</li>
<li>Third item
<ol>
<li>Indented item</li>
<li>Indented item</li>
</ol>
</li>
<li>Fourth item</li>
</ol>
  1. First item
  2. Second item
  3. Third item
    1. Indented item
    2. Indented item
  4. Fourth item

Ordered List Best Practices

CommonMark and a few other lightweight markup languages let you use a parenthesis ()) as a delimiter (e.g., 1) First item), but not all Markdown applications support this, so it isn’t a great option from a compatibility perspective. For compatibility, use periods only.

✅ Do this❌ Don't do this
1. First item
2. Second item
1) First item
2) Second item

Unordered Lists

To create an unordered list, add dashes (-), asterisks (*), or plus signs (+) in front of line items. Indent one or more items to create a nested list.

MarkdownHTMLRendered Output
- First item
- Second item
- Third item
- Fourth item
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ul>
  • First item
  • Second item
  • Third item
  • Fourth item
* First item
* Second item
* Third item
* Fourth item
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ul>
  • First item
  • Second item
  • Third item
  • Fourth item
+ First item
+ Second item
+ Third item
+ Fourth item
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item</li>
<li>Fourth item</li>
</ul>
  • First item
  • Second item
  • Third item
  • Fourth item
- First item
- Second item
- Third item
- Indented item
- Indented item
- Fourth item
<ul>
<li>First item</li>
<li>Second item</li>
<li>Third item
<ul>
<li>Indented item</li>
<li>Indented item</li>
</ul>
</li>
<li>Fourth item</li>
</ul>
  • First item
  • Second item
  • Third item
    • Indented item
    • Indented item
  • Fourth item

Starting Unordered List Items With Numbers

If you need to start an unordered list item with a number followed by a period, you can use a backslash () to escape the period.

MarkdownHTMLRendered Output
- 1968. A great year!
- I think 1969 was second best.
<ul>
<li>1968. A great year!</li>
<li>I think 1969 was second best.</li>
</ul>
  • 1968. A great year!
  • I think 1969 was second best.

Redmine Markdown Image Size

Unordered List Best Practices

Redmine Markdown

Markdown applications don’t agree on how to handle different delimiters in the same list. For compatibility, don’t mix and match delimiters in the same list — pick one and stick with it.

✅ Do this❌ Don't do this
- First item
- Second item
- Third item
- Fourth item
+ First item
* Second item
- Third item
+ Fourth item

Adding Elements in Lists

To add another element in a list while preserving the continuity of the list, indent the element four spaces or one tab, as shown in the following examples.

Paragraphs

The rendered output looks like this:

  • This is the first list item.
  • Here’s the second list item.

    I need to add another paragraph below the second list item.

  • And here’s the third list item.

Blockquotes

The rendered output looks like this:

  • This is the first list item.
  • Here’s the second list item.

    A blockquote would look great below the second list item.

  • And here’s the third list item.

Code Blocks

Code blocks are normally indented four spaces or one tab. When they’re in a list, indent them eight spaces or two tabs.

The rendered output looks like this:

  1. Open the file.
  2. Find the following code block on line 21:

  3. Update the title to match the name of your website.

Images

The rendered output looks like this:

  1. Open the file containing the Linux mascot.
  2. Marvel at its beauty.

  3. Close the file.

Lists

You can nest an unordered list in an ordered list, or vice versa.

The rendered output looks like this:

  1. First item
  2. Second item
  3. Third item
    • Indented item
    • Indented item
  4. Fourth item

Code

To denote a word or phrase as code, enclose it in backticks (`).

MarkdownHTMLRendered Output
At the command prompt, type `nano`.At the command prompt, type <code>nano</code>. At the command prompt, type nano.

Escaping Backticks

If the word or phrase you want to denote as code includes one or more backticks, you can escape it by enclosing the word or phrase in double backticks (``).

MarkdownHTMLRendered Output
``Use `code` in your Markdown file.``<code>Use `code` in your Markdown file.</code>Use `code` in your Markdown file.

Code Blocks

To create code blocks, indent every line of the block by at least four spaces or one tab.

The rendered output looks like this:

Note: To create code blocks without indenting lines, use fenced code blocks.

Horizontal Rules

To create a horizontal rule, use three or more asterisks (***), dashes (---), or underscores (___) on a line by themselves.

The rendered output of all three looks identical:

Horizontal Rule Best Practices

For compatibility, put blank lines before and after horizontal rules.

✅ Do this❌ Don't do this
Try to put a blank line before...
---
...and after a horizontal rule.
Without blank lines, this would be a heading.
---
Don't do this!

Links

To create a link, enclose the link text in brackets (e.g., [Duck Duck Go]) and then follow it immediately with the URL in parentheses (e.g., (https://duckduckgo.com)).

The rendered output looks like this:

My favorite search engine is Duck Duck Go.

Adding Titles

You can optionally add a title for a link. This will appear as a tooltip when the user hovers over the link. To add a title, enclose it in parentheses after the URL.

The rendered output looks like this:

My favorite search engine is Duck Duck Go.

URLs and Email Addresses

To quickly turn a URL or email address into a link, enclose it in angle brackets.

The rendered output looks like this:

https://www.markdownguide.org
fake@example.com

Formatting Links

To emphasize links, add asterisks before and after the brackets and parentheses. To denote links as code, add backticks in the brackets.

The rendered output looks like this:

I love supporting the EFF.
This is the Markdown Guide.
See the section on code.

Reference-style Links

Reference-style links are a special kind of link that make URLs easier to display and read in Markdown. Reference-style links are constructed in two parts: the part you keep inline with your text and the part you store somewhere else in the file to keep the text easy to read.

Formatting the First Part of the Link

The first part of a reference-style link is formatted with two sets of brackets. The first set of brackets surrounds the text that should appear linked. The second set of brackets displays a label used to point to the link you’re storing elsewhere in your document.

Although not required, you can include a space between the first and second set of brackets. The label in the second set of brackets is not case sensitive and can include letters, numbers, spaces, or punctuation.

This means the following example formats are roughly equivalent for the first part of the link:

  • [hobbit-hole][1]
  • [hobbit-hole] [1]

Formatting the Second Part of the Link

The second part of a reference-style link is formatted with the following attributes:

  1. The label, in brackets, followed immediately by a colon and at least one space (e.g., [label]: ).
  2. The URL for the link, which you can optionally enclose in angle brackets.
  3. The optional title for the link, which you can enclose in double quotes, single quotes, or parentheses.

This means the following example formats are all roughly equivalent for the second part of the link:

  • [1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle
  • [1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle 'Hobbit lifestyles'
  • [1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle 'Hobbit lifestyles'
  • [1]: https://en.wikipedia.org/wiki/Hobbit#Lifestyle (Hobbit lifestyles)
  • [1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> 'Hobbit lifestyles'
  • [1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> 'Hobbit lifestyles'
  • [1]: <https://en.wikipedia.org/wiki/Hobbit#Lifestyle> (Hobbit lifestyles)

You can place this second part of the link anywhere in your Markdown document. Some people place them immediately after the paragraph in which they appear while other people place them at the end of the document (like endnotes or footnotes).

An Example Putting the Parts Together

Say you add a URL as a standard URL link to a paragraph and it looks like this in Markdown:

Though it may point to interesting additional information, the URL as displayed really doesn’t add much to the existing raw text other than making it harder to read. To fix that, you could format the URL like this instead:

In both instances above, the rendered output would be identical:

In a hole in the ground there lived a hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole with nothing in it to sit down on or to eat: it was a hobbit-hole, and that means comfort.

and the HTML for the link would be:

Link Best Practices

Markdown applications don’t agree on how to handle spaces in the middle of a URL. For compatibility, try to URL encode any spaces with %20.

✅ Do this❌ Don't do this
[link](https://www.example.com/my%20great%20page) [link](https://www.example.com/my great page)

Images

To add an image, add an exclamation mark (!), followed by alt text in brackets, and the path or URL to the image asset in parentheses. You can optionally add a title after the URL in the parentheses.

The rendered output looks like this:

Linking Images

To add a link to an image, enclose the Markdown for the image in brackets, and then add the link in parentheses.

The rendered output looks like this:

Escaping Characters

To display a literal character that would otherwise be used to format text in a Markdown document, add a backslash () in front of the character.

The rendered output looks like this:

* Without the backslash, this would be a bullet in an unordered list.

Characters You Can Escape

You can use a backslash to escape the following characters.

Redmine markdown toc
CharacterName
backslash
`backtick (see also escaping backticks in code)
*asterisk
_underscore
{ }curly braces
[ ]brackets
< >angle brackets
( )parentheses
#pound sign
+plus sign
-minus sign (hyphen)
.dot
!exclamation mark
|pipe (see also escaping pipe in tables)

HTML

Many Markdown applications allow you to use HTML tags in Markdown-formatted text. This is helpful if you prefer certain HTML tags to Markdown syntax. For example, some people find it easier to use HTML tags for images. Using HTML is also helpful when you need to change the attributes of an element, like specifying the color of text or changing the width of an image.

To use HTML, place the tags in the text of your Markdown-formatted file.

The rendered output looks like this:

This word is bold. This word is italic.

HTML Best Practices

For security reasons, not all Markdown applications support HTML in Markdown documents. When in doubt, check your Markdown application’s documentation. Some applications support only a subset of HTML tags.

Use blank lines to separate block-level HTML elements like <div>, <table>, <pre>, and <p> from the surrounding content. Try not to indent the tags with tabs or spaces — that can interfere with the formatting.

You can’t use Markdown syntax inside block-level HTML tags. For example, <p>italic and **bold**</p> won’t work.

Take your Markdown skills to the next level.

Learn Markdown in 60 pages. Designed for both novices and experts, The Markdown Guide book is a comprehensive reference that has everything you need to get started and master Markdown syntax.

Get the Book
Want to learn more Markdown?

Don't stop now! 😎 Star the GitHub repository and then enter your email address below to receive new Markdown tutorials via email. No spam!

Feature #15520

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Text formatting
Target version:2.5.0
Resolution:Fixed

Description

The (well... my) world is moving towards Markdown for formatting text: GitHub, WordPress, LeanPub all support it natively.

I have used a Markdown plugin with Redmine years ago (in the 1.x series), with limited success, perhaps partly due to the plugin not tracking Redmine releases. Now I'm on 2.3.x, about to move to 2.4.x. The contributors to our open source wiki's, forums, and issue trackers all use Textile and the conversion to get there was a bit painful at the time.

I'd like to ask, nay beg on my knees, to consider adding Markdown as first-class citizen to Redmine. It would mean a substantial amount of content conversion for me, but in the long run I nevertheless consider this a no-brainer: Markdown has become the de-facto standard across a wide range of use-cases, and some sites add extra features to make it fit their specific needs even better. Markdown-with-diverging-extensions would be still vastly preferable to me over the Textile-Markdown mix I currently have to take care of. Every message, post, issue, and reply requires extra attention to stick to the proper formatting rules (evidently) - it adds up, and it keeps on adding up.

Nirvana would be to reached by even allowing admins to change the formatting of an existing project area, perhaps using pandoc for the process. I suspect that there might be a fair amount of pent-up demand for this, but it's obviously a lot more work and only relevant once the essential first step has been implemented.

I'll gladly make another donation to Redmine if this helps put this feature request on the roadmap, but yeah... I know it's a big wish and no doubt everyone on the Redmine time is already more than busy.

But please do (re-) consider this seriously. There's nothing wrong with occasionally re-evaluating past choices.

-jcw

Related issues

Associated revisions

Revision 12452

Adds experimental support for Markdown formatting with redcarpet (#15520).

Revision 12461

fix typo redcarpet requirement in lib/redmine.rb (#15520)

Revision 14244

Removed experimental flag on markdown format (#15520).

History

#1 Updated by Jan Niggemann (redmine.org team member)over 7 years ago

  • Tracker changed from Defect to Feature

Of course, this is no defect, but a feature request...

#2 Updated by Anonymous over 7 years ago

#3 Updated by ixbidie ixbidieover 7 years ago

there is a plugin implementing exactly this.

#4 Updated by Jean-Philippe Langover 7 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 2.5.0
  • Resolution set to Fixed

Markdown formatting support is added in r12452 using the redcarpet gem. It should be considered as experimental for now but already supports syntax highlight integration, single section edit for wiki pages, inline images from attachments and Redmine links. There's no plan to provide automatic convertion of existing text from textile to markdown.

#5 Updated by Jean-Claude Wipplerover 7 years ago

Confirmed on 2.4.2.devel.12480. Works great - fantastic, thank you!

Redmine

(yeah, automatic conversion would require something like Pandoc - a per-project setting might be useful as first work-around to support gradual manual migration, but then you need another setting for non-project related stuff, such as site descriptions)

#6 Updated by mc0e .almost 6 years ago

Redmine markdown manager

Where this is considered experimental, are there known shortcomings, or is it just that issues may not yet have surfaced?

Does this status need review now, being a year down the track? Are there known issues that should perhaps be linked here?

#7 Updated by Jean-Philippe Langalmost 6 years ago

mc0e . wrote:

Where this is considered experimental, are there known shortcomings, or is it just that issues may not yet have surfaced?

Does this status need review now, being a year down the track? Are there known issues that should perhaps be linked here?

No known issues AFAIK, the experimental flag will be removed in 3.1.0

#8 Updated by Anonymous almost 6 years ago

@Jean: Hate to burst your bubble, but I just found a minor syntax issue with the Markdown implementation in 2.6 (which I just logged, see #19880).

#9 Updated by PICCORO LenzMcKAYalmost 6 years ago

i recently migrated to redmine 3 series, and the firts problem was the markdown.. i'm not happy with that change.. there' lof of issues and the markdown ussage was force due github success that are not complety free...

as always: a company are behing the firts fist! and then everibody change the world!

#10 Updated by dezhi xiongalmost 6 years ago

Hi,how can I find document about markdown text formatting? I found this link(https://www.redmine.org/projects/redmine/wiki/RedmineTextFormatting), it says for markdown formatting please refer to #15520 . But in this issue, I didn't find any documents. Eg, how can I link to an issue in markdown since # is a special char in markdown?

#11 Updated by dumb blobalmost 6 years ago

@dezhi Markdown documentation is completely missing. I'd recommend this interactive documentation http://agea.github.io/tutorial.md/ . It's for CommonMark (http://commonmark.org/), so it should be 100% compatible.

Anyway, there seems to be another major issue: HTML tags are not always preserved - e.g. Administration -> Settings -> put <div>abc</div> to the welcome text field; save it and open the welcome page, take a look at the source and there is no div!

Is this feature disabled by default in the bundled redcarpet gem?

#12 Updated by Mischa The Evilalmost 6 years ago

dezhi xiong wrote:

Hi,how can I find document about markdown text formatting? I found this link(https://www.redmine.org/projects/redmine/wiki/RedmineTextFormatting), it says for markdown formatting please refer to #15520 . But in this issue, I didn't find any documents. [...]

dumb blob wrote:

@dezhi Markdown documentation is completely missing. I'd recommend this interactive documentation http://agea.github.io/tutorial.md/. [...]

Well, there currently isn't an online equivalent of RedmineTextFormatting for Markdown syntax (yet). The reference to this issue was probably added to indicate that Markdown formatting is not what is described in that specific wiki page (and this issue implemented the Markdown formatting).
Starting from not-yet released 3.1.0, Redmine will ship with local help files for Markdown formatting syntax (accessible using the 'Help' button in the editor toolbar [only when Markdown formatting is active]). This is implemented via issue #16373.

@ dumb blob: the more common reference (that will also be used in Redmine >= 3.1.0) is http://daringfireball.net/projects/markdown/syntax.

dumb blob wrote:

[...]
Anyway, there seems to be another major issue: HTML tags are not always preserved - e.g. Administration -> Settings -> put <div>abc</div> to the welcome text field; save it and open the welcome page, take a look at the source and there is no div!
Is this feature disabled by default in the bundled redcarpet gem?

This is something that is not supported by neither the Textile formatting nor the Markdown formatting implementation in Redmine. For the Textile implementation see source:/trunk/lib/redcloth3.rb@14449#L1202, the div tag is not allowed nor recognized. For the Markdown implementation see source:/trunk/lib/redmine/wiki_formatting/markdown/formatter.rb@14449#L122, which tells the Redcarpet gem to filter out any HTML from the user input completely.
FTR: there are currently no known major issues with the Markdown formatter. The only existing minor syntax issue is the one cited by Andre Greeff in note-8.

#13 Updated by dumb blobalmost 6 years ago

Well, there currently isn't an online equivalent of RedmineTextFormatting for Markdown syntax (yet). The reference to this issue was probably added to indicate that Markdown formatting is not what is described in that specific wiki page (and this issue implemented the Markdown formatting).
Starting from not-yet released 3.1.0, Redmine will ship with local help files for Markdown formatting syntax (accessible using the 'Help' button in the editor toolbar [only when Markdown formatting is active]). This is implemented via issue #16373.

Well, I recommended the CommonMark tutorial http://agea.github.io/tutorial.md/ because of two reasons. First, it's more user friendly and 'obvious' for new users. Second, redcarpet is slowly implementing CommonMark features (see github issues).

@ dumb blob: the more common reference (that will also be used in Redmine >= 3.1.0) is http://daringfireball.net/projects/markdown/syntax.

True, but I'm still seeing the tutorial above as more viable (for the two reasons mentioned above).

dumb blob wrote:

[...]
Anyway, there seems to be another major issue: HTML tags are not always preserved - e.g. Administration -> Settings -> put <div>abc</div> to the welcome text field; save it and open the welcome page, take a look at the source and there is no div!
Is this feature disabled by default in the bundled redcarpet gem?

This is something that is not supported by neither the Textile formatting nor the Markdown formatting implementation in Redmine. For the Textile implementation see source:/trunk/lib/redcloth3.rb@14449#L1202, the div tag is not allowed nor recognized. For the Markdown implementation see source:/trunk/lib/redmine/wiki_formatting/markdown/formatter.rb@14449#L122, which tells the Redcarpet gem to filter out any HTML from the user input completely.
FTR: there are currently no known major issues with the Markdown formatter. The only existing minor syntax issue is the one cited by Andre Greeff in note-8.

Actually, this is a huge violation of Markdown (and CommonMark as well). Embedded HTML is the feature making Markdown so widespread. Look at the http://daringfireball.net/projects/markdown/syntax website you linked. It's mentioned there as a major feature (same holds for CommonMark). If you really decide to hardcode this decision of disabling HTML, you can't aim users at the documentation from http://daringfireball.net/projects/markdown/syntax any more. That means make your own, which will emphasize that there is no HTML allowed contrary to standard Markdown/CommonMark (the currently proposed documentation http://www.redmine.org/issues/16373#note-13 doesn't do this).

Also except for missing HTML as a major feature, there are other differences to standard Markdown/CommonMark (new keywords etc.), so this is not anymore standard Markdown/CommonMark and thus it should be named Redmine Markdown (i.e. yet another Markdown flavour), but not just Markdown. This requirement is directly from the original Markdown author John Gruber (author of the page you linked - http://daringfireball.net/projects/markdown/syntax).

#14 Updated by Jean-Claude Wippleralmost 6 years ago

this is a huge violation of Markdown

I vote for renaming this to Redmine Markdown.

In my years of using Markdown, I've never felt the need for HTML. As this discussion itself illustrates, there is enough richness to use Redmine for its intended purposes as is - some might even say that italic and bold SHOUTING adds preciously little to a discussion, other than heat... (arguments don't become more valid by adding typographical annotations - only more annoying, if you ask me).

I see no problem in pointing to Gruber's original Markdown docs with the note that inline HTML is not supported.

#15 Updated by dumb blobalmost 6 years ago

In my years of using Markdown, I've never felt the need for HTML. As this discussion itself illustrates, there is enough richness to use Redmine for its intended purposes as is - some might even say that italic and bold SHOUTING adds preciously little to a discussion, other than heat... (arguments don't become more valid by adding typographical annotations - only more annoying, if you ask me).

Usually HTML in Markdown/CommonMark is used for styling non-text content (e.g. inline images - especially to manage their size). So the richness you mentioned doesn't apply for these common cases.

Also let me apologize for emphasizing key points with arguments using typographical annotations - I come from a culture, where shouting is expressed using an exclamation mark (neither with bold nor italic).

I see no problem in pointing to Gruber's original Markdown docs with the note that inline HTML is not supported.

If all the differences between standard Markdown/CommonMark and the Redmine Markdown are mentioned up front, then there is absolutely no issue with pointing to the daringfireball markdown page.

#16 Updated by Anonymous over 5 years ago

Mischa The Evil wrote:

Redmine Markdown Plugin

[...]
dumb blob wrote:

[...]
Anyway, there seems to be another major issue: HTML tags are not always preserved - e.g. Administration -> Settings -> put <div>abc</div> to the welcome text field; save it and open the welcome page, take a look at the source and there is no div!
Is this feature disabled by default in the bundled redcarpet gem?

This is something that is not supported by neither the Textile formatting nor the Markdown formatting implementation in Redmine.
[...]
For the Markdown implementation see source:/trunk/lib/redmine/wiki_formatting/markdown/formatter.rb@14449#L122, which tells the Redcarpet gem to filter out any HTML from the user input completely.

Is there any specific reason for that..? I just turned off the HTML filter in my instance and I don't see any immediate issues.

I recently migrated my DB over to 2.6.6 from a 2.5.2 instance where we were using CKEditor. All my previous content (50+ projects, almost 1000 issue reports, +/- 600 wiki pages, etc..) was all saved as HTML thanks to CKeditor, but the move over to Markdown should be pretty painless since it renders to HTML anyway. The end result should have no difference in the rendering. As 'dumb blob' (really..?) pointed out, stripping out the HTML sort of defeats the purpose here, so I can't imagine that choice was without a good reason..

As per the DaringFireball page you (Mischa) linked to:

For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.

Either way, now that I know it's just configuration, I'll just have to run with this disabled on my side for now. However, I really think this should either be disabled or at least made to be optional.

At this rate we may even need a whole new configuration page for 'Redmine formatting' one day. :)

#17 Updated by mc0e .over 5 years ago

Mischa The Evil wrote:

Is there any specific reason for that..? I just turned off the HTML filter in my instance and I don't see any immediate issues.

Allowing direct insertion of html opens up a variety of attacks for purposes like stealing session cookies from other users, and click-jacking attacks on other sites. A very careful filtering of submitted html can mostly prevent this, but it's very easy to make mistakes and leave vulnerabilities open.

No doubt there are redmine sites which are open to use only by trusted users, and then it might be quite safe to allow html, but this is not always the case.

#18 Updated by Go MAEDAover 5 years ago

Please create a new issue for a feature request. This issue is closed.

#19 Updated by dumb blobover 5 years ago

A new issue http://www.redmine.org/issues/20497 on Markdown with HTML is created. Fell free to add yourself to watchers.

#20 Updated by Go MAEDAover 5 years ago

  • Related toFeature #20497: Markdown formatting supporting HTML added

#21 Updated by Go MAEDAover 5 years ago

  • Duplicated byFeature #14260: Simplify the syntax highlighting added

#22 Updated by Viktor Berkeabout 5 years ago

#23 Updated by Adrien Crivellialmost 5 years ago

A quick note for people looking for a tool to convert textile to markdown. There is a rake task that can do that: https://github.com/Ecodev/redmine_convert_textile_to_markown

#24 Updated by Hiroo Hayashialmost 5 years ago

I updated RedmineTextFormattingMarkdown.
I added the following sentence at the top of the page;

Currently HTML tags are not allowed by default. See #15520 and #20497 for details.

Redmine Markdown Manager

I tried to make the Markdown wiki page compatible with the Textile wiki page as far as I could. I added some examples using HTML tags where they were required.

See #16373 and #23413 for more details.

#25 Updated by Charles Sporkmanover 4 years ago

Perhaps this is a silly question, but is Markdown supported at all outside of wiki pages? I have people begging for it in areas like this one right here we're looking at - the issue tracker.

#26 Updated by Adrien Crivelliover 4 years ago

Yes markdown is supported everywhere where textile is supported, including issues, as long as you select the markdown format in Redmine global settings.

#27 Updated by Bintintan Andreiabout 1 year ago

  • FileScreenshot_45.png added

Redmine Markdown Image Size

Hiroo Hayashi wrote:

I updated RedmineTextFormattingMarkdown.
I added the following sentence at the top of the page;
See #16373 and #23413 for more details.

In RedmineTextFormattingMarkdown there are examples of HTML code, but they are not working. Is this a problem in the documentation, do they not work, or do I have a setting problem?

See attached screenshot.

Also available in: AtomPDF