typora-issues icon indicating copy to clipboard operation
typora-issues copied to clipboard

Allow empty lines and render Markdown inside HTML tags

Open jbrains opened this issue 6 years ago • 24 comments

I typically want to write Markdown content inside a div or p. Currently, I do this:

<div class="aside" markdown="1">

Write a _bunch_ of **wonderful** Markdown!

</div>

I would love it if Typora would render Markdown in its typical WYSIWYG way inside such an HTML tag.

jbrains avatar Nov 04 '18 10:11 jbrains

I have the same concern.

As I tend to use a lot of <details> tag when writing Markdown, this has become an annoying thing for me. Take an example from README:

<details>
<summary>Wolfram MathWorld</summary>

For checking definitions in maths, stats and computer science.
> alfred://customsearch/Search%20%7Bquery%7D%20in%20Wolfram%20MathWorld/math/utf8/%2B/http%3A%2F%2Fmathworld.wolfram.com%2Fsearch%2F%3Fquery%3D%7Bquery%7D

The default keyword is `math`.
</details>

is rendered correctly in GitHub Flavoured Markdown (as well as Byword, the editor I previously used).

:arrow_down:

Wolfram MathWorld

For checking definitions in maths, stats and computer science.

alfred://customsearch/Search%20%7Bquery%7D%20in%20Wolfram%20MathWorld/math/utf8/%2B/http%3A%2F%2Fmathworld.wolfram.com%2Fsearch%2F%3Fquery%3D%7Bquery%7D

The default keyword is math.

:arrow_up:

It seems Typora do not currently render Markdown Syntax within HTML tags in the same way. Maybe we should make an exception for specific tags like <details> which contribute a lot to the format of Markdown?

Regards.

BaksiLi avatar May 29 '19 12:05 BaksiLi

I have the same concern.

As I tend to use a lot of <details> tag when writing Markdown, this has become an annoying thing for me. Take an example from README:

<details>
<summary>Wolfram MathWorld</summary>

For checking definitions in maths, stats and computer science.
> alfred://customsearch/Search%20%7Bquery%7D%20in%20Wolfram%20MathWorld/math/utf8/%2B/http%3A%2F%2Fmathworld.wolfram.com%2Fsearch%2F%3Fquery%3D%7Bquery%7D

The default keyword is `math`.
</details>

is rendered correctly in GitHub Flavoured Markdown (as well as Byword, the editor I previously used).

⬇️

Wolfram MathWorld ⬆️

It seems Typora do not currently render Markdown Syntax within HTML tags in the same way. Maybe we should make an exception for specific tags like <details> which contribute a lot to the format of Markdown?

Regards.

Typora really needs to support this kind of grammar. Now if I want to write collapsible items with Typora, I have no other method but to use pure html language, which is usually longer and inconvenient.

LiukDiihMieu avatar Aug 23 '19 09:08 LiukDiihMieu

This is indeed a very needed and useful feature, because otherwise we loose all of Typora's markdown power when writing HTML tags, specially in collapsible texts, which are so common.

A possible solution (if it makes it easier/possible for development) would be adding support for <markdown> tag inside HTML blocks, for example:

<details>
    <summary> This is collapsible </summary>

    Text inside <details> doesn't support Markdown.

    <markdown>
        ## This is the Markdown HTML Tag

        Text inside this tag should be parsed and rendered as `Markdown` by **Typora**.
        We should be able to use the `<markdown>´ tag inside other HTML tags as well,
        not only inside `<details>` and `<summary>` tags.
    </markdown>
</details>

ThiagoRangel7 avatar Sep 17 '19 15:09 ThiagoRangel7

The HTML attribute markdown="1" has already emerged as an unofficial standard. I encourage following it and perhaps trying to elevate it to an official standard.

jbrains avatar Sep 17 '19 16:09 jbrains

Please consider adding this feature in the future, I definitely want to use codeblock within details/summary tag!

Dongfeng-He avatar Nov 22 '19 02:11 Dongfeng-He

Please consider this feature in these days. It's really meaningful for us.

beiluo97 avatar Apr 12 '20 13:04 beiluo97

I echo this request - my use case is using html div blocks to quickly style sections of my documents while retaining the ability to write their contents in markdown.

jacoscaz avatar Sep 25 '20 10:09 jacoscaz

+1 details tag is very useful while writing faq sections and not being able to use markdown is lame. It believe rendering it should be supported even if it means that users need to edit raw markdown code.

debanjandhar12 avatar Sep 30 '20 06:09 debanjandhar12

If you export your mixed html/markdown as html without styling, you can see that open html tags on their own lines are immediately closed like so: <div></div>, and closing html tags on their own line are wrapped inside a p tag like so: <p></div></p>. Please fix this!

certikfoundation-shared avatar Oct 26 '20 15:10 certikfoundation-shared

But the problem remains unsolved! We NEED this property of HTML.

yfzhao20 avatar Jun 20 '21 08:06 yfzhao20

Yes, it's very useful to support markdown renderd in html div or blocks.

funrunskypalace avatar Aug 27 '21 07:08 funrunskypalace

The issue with adding unwanted closing tags referred to by @certikfoundation-shared also exists in the full HTML export, not just without styling. This is irritating when, for example, you want to enclose a section of markup with a <div style="display:none"></div> as the extra closing tag needs to be manually removed after each export.

MetaTunes avatar Aug 31 '21 23:08 MetaTunes

I just want to add another voice requesting this. There is a big gap in the market currently for a decent simple text editor that can handle collapsible text with decent formatting. Fixing this would make this easy to handle via detail and summary HTML tags (as several people note above)

HackMD will actually handle this, and for the moment this is pulling me away from typora to HackMD (and its electron-wrapper desktop version) for some tasks. I'd rather stay in typora

DanBennettDev avatar Mar 01 '22 10:03 DanBennettDev

Why are so many people raising the issue and the team not fixing it?

aitimate avatar Mar 02 '22 15:03 aitimate

Hi, is this update in the roadmap? With GitHub adopting this, a lot of Typora users need this. https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/organizing-information-with-collapsed-sections

I hope it is in the works, as this has been requested since 2018.

Thanks, Danilo.

dramoz avatar Jun 08 '22 13:06 dramoz

I use Markdown combined with the details tag every day . This feature is most needed for me. Thanks

DLatreyte avatar Jul 06 '22 12:07 DLatreyte

need this also

xiehuc avatar Jul 07 '22 06:07 xiehuc

need this also

ricear avatar Jul 28 '22 03:07 ricear

Since 2018, four years!!! And it is no longer free! Hope for an update!

yzy1996 avatar Sep 07 '22 07:09 yzy1996

Since it's been almost 5 years, I'm assuming there is no intention to add this basic feature, ever.

Link for those interested in refunding Typora: https://support.typora.io/purchase/#can-i-get-my-money-back-refund

EpicOrange avatar Feb 28 '23 09:02 EpicOrange

I am not interested in a refund. I have easily got my money's worth from Typora over the years.

It seems, however, that this feature has become more urgent for more people, so I support the increasing number of requests for it.

Are there technical limitations or other difficulties related to this feature? or is it merely a matter of "too much to do"?

jbrains avatar Feb 28 '23 10:02 jbrains

I notice this issue is still open: can the Typora team please fix this? This should have slowly made its way up to a p0 after five years and should literally be the only thing that gets worked on before any other issues are picked up, so that "we support GitHub flavoured markdown" is finally true again =)

Pomax avatar Dec 03 '23 17:12 Pomax