Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow empty lines and render Markdown inside HTML tags #1939

Open
jbrains opened this issue Nov 4, 2018 · 28 comments
Open

Allow empty lines and render Markdown inside HTML tags #1939

jbrains opened this issue Nov 4, 2018 · 28 comments

Comments

@jbrains
Copy link

jbrains commented Nov 4, 2018

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
Copy link

BaksiLi commented May 29, 2019

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

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.

⬆️

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
Copy link

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
Copy link

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
Copy link
Author

jbrains commented Sep 17, 2019

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
Copy link

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

@abnerlee abnerlee changed the title Render Markdown inside HTML tags Allow empty lines and render Markdown inside HTML tags Mar 8, 2020
@beiluo97
Copy link

beiluo97 commented Apr 12, 2020

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

@jacoscaz
Copy link

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
Copy link

debanjandhar12 commented Sep 30, 2020

+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

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
Copy link

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

@funrunskypalace
Copy link

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

@MetaTunes
Copy link

MetaTunes commented Aug 31, 2021

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
Copy link

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
Copy link

aitimate commented Mar 2, 2022

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

@dramoz
Copy link

dramoz commented Jun 8, 2022

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
Copy link

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

@xiehuc
Copy link

xiehuc commented Jul 7, 2022

need this also

1 similar comment
@ricear
Copy link

ricear commented Jul 28, 2022

need this also

@yzy1996
Copy link

yzy1996 commented Sep 7, 2022

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

@EpicOrange
Copy link

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
Copy link
Author

jbrains commented Feb 28, 2023

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
Copy link

Pomax commented Dec 3, 2023

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
Copy link

insujeon commented Sep 15, 2024

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

@stephenberry
Copy link

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

@Deepcity
Copy link

Deepcity commented Nov 22, 2024

When I first discovered this bug, I couldn't imagine that such a long-lasting, obvious, and impressive bug existed in such a prestigious editor.
Users really need to fix it.
Typora does so well in other aspects that such a bug is like dust on a rough diamond.

@Pomax
Copy link

Pomax commented Nov 22, 2024

it's almost as if, had the parser/converter part been open source, the community could have fixed this six years ago.

@Harry12Potter
Copy link

Today is the last day of 2024 and I just tried Typora for two days.
I decided to give up on Typora when I realized that the problem had actually remained for more than 6 years.

Farewell

Thanks for the 15 day free trial.

@Pomax
Copy link

Pomax commented Dec 31, 2024

To be fair: Typora was bought by a Chinese company that has zero information about it anywhere on the web (unless you count a battery manufacturer by the same name, which would have no business buying a markdown editor) which they didn't even call out in their EULA until a few days ago. It might be time to leave Typora for more than just this issue's reason. Next thing you know, Typora's the new polyfilljs, shipping with exploits landed, except unlike polyfilljs it's closed source and they have access to your entire computer, rather than just "whatever can be exploited through JS in a browser".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests