typora / typora-issues

Bugs, suggestions or free discussions about the minimal markdown editor — Typora
https://typora.io
1.53k stars 56 forks source link

Allow empty lines and render Markdown inside HTML tags #1939

Open jbrains opened 6 years ago

jbrains commented 6 years ago

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.

BaksiLi commented 5 years ago

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.

LiukDiihMieu commented 5 years ago

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.

ThiagoRangel7 commented 5 years ago

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>
jbrains commented 5 years ago

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.

Dongfeng-He commented 4 years ago

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

beiluo97 commented 4 years ago

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

jacoscaz commented 4 years ago

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.

debanjandhar12 commented 4 years ago

+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.

certikfoundation-shared commented 4 years ago

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!

yfzhao20 commented 3 years ago

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

funrunskypalace commented 3 years ago

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

MetaTunes commented 3 years ago

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.

DanBennettDev commented 2 years ago

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

aitimate commented 2 years ago

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

dramoz commented 2 years ago

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.

DLatreyte commented 2 years ago

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

xiehuc commented 2 years ago

need this also

ricear commented 2 years ago

need this also

yzy1996 commented 2 years ago

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

EpicOrange commented 1 year ago

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

jbrains commented 1 year ago

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"?

Pomax commented 11 months ago

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 =)

insujeon commented 2 months ago

If Typora supports this collapse or hides features, typora is the king of the minimal Markdown editor.

stephenberry commented 1 month ago

Not being able to match GitHub markdown with this feature is a major pain.