kzykhys / Ciconia

A New Markdown parser for PHP5.4
http://ciconia.kzykhys.com/
MIT License
355 stars 31 forks source link

How to disable certain markdown? #34

Closed t3chn0r closed 10 years ago

t3chn0r commented 10 years ago

I would like to disable certain markdown from the core, for example, I don't want users to post images, I can go ahead and not document that markdown but if a user is little bit technical and knows about markdown can easily use them...

I would like to disable then the following markdown:

![Alt text](/path/to/image.png)

Is there any option to do this? I haven't found anything...

Taluu commented 10 years ago

You have to remove the core extension Ciconia\Extension\Core\ImageExtension from the default stack of extensions that Circonia registers in its construtor.

To do that, you'll need to call $circonia->removeExtension('image');. :)

t3chn0r commented 10 years ago

Thanks! Perfect!