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

Can you disable features of markdown? #79

Open
ghost opened this issue Feb 13, 2016 · 3 comments
Open

Can you disable features of markdown? #79

ghost opened this issue Feb 13, 2016 · 3 comments

Comments

@ghost
Copy link

ghost commented Feb 13, 2016

I don't want to allow the heading features of markdown for the users.

@Knagis
Copy link
Owner

Knagis commented Feb 14, 2016

Currently you cannot remove any features specified in CommonMark spec.

Some other options:

See #38 - you could offset the heading levels so that the users cannot create h1, just h3 etc.

If you want to completely remove the heading you would probably have to instead change the Tag value to something like BlockTag.Paragraph.

The other option is to use the formatter extensibility to render something other than h* elements.

@Blinky32
Copy link

I think that ability to remove a feature, or better yet specify white list of features, would really help Markdown adoption. Basically allow us to easily define a Markdown subset and it can solve a lot of issues related to a perceived 'unsafeness' of Markdown. Common use case - StackOverflow comments section with their 'mini-Markdown' that allows only bold, italic and link.

@xt0rted
Copy link

xt0rted commented Aug 19, 2017

Whitelisting features would be really helpful. I'd like to let users use the basic text formatting features (bold, italic, underline, delete) but I don't want the rest (no html, headers, links, images, etc.).

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

No branches or pull requests

3 participants