Page 1 of 1

Using Markdown in the core (latest core svn)

Posted: Mon Apr 24, 2006 9:44 pm
by calguy1000
In the latest core svn code (I just committed it minutes ago), I've added the Markdown language.

to use it, just modify your templates in one of these two ways:

a) Use markdown as a block tag
you can do something like this in your template.

Code: Select all

{markdown}
{content wysiwig=false}
{/markdown}
b) Use markdown as a modifier

Code: Select all

{content wysiwig=false | markdown }
It should just work.  and should allow you to develop html code without having to learn html (well, you'll have to learn the markdown syntax instead.

The markdown syntax is available here:  http://daringfireball.net/projects/markdown/syntax

Have fun everybody.

Re: Using Markdown in the core (latest core svn)

Posted: Tue Apr 25, 2006 12:05 am
by calguy1000
I erred, if you're using the latest and greatest svn, and you wish to use the markdown stuff in block form you need to use

Code: Select all

{cms_markdown}
stuff
===
{/cms_markdown}

Re: Using Markdown in the core (latest core svn)

Posted: Mon May 22, 2006 4:14 pm
by tsw
as calguy is such a nice person to let us use markdown I imported a markdown toolbar for him  ;D

http://dev.cmsmadesimple.org/projects/markdowntoolbar/

Re: Using Markdown in the core (latest core svn)

Posted: Fri Oct 13, 2006 3:13 pm
by glezos
Hi.

First of all, 1K thanks for adding Markdown to the core. This is a great addition.

Is there any way that one could disable markdown inside another smarty tag? For example:

{cms_markdown}
  foo...
    {news markdown=false}
  bar...
{/cms_markdown}

Because without this, the stuff {news} return get messed up by markdown.

Thanks again!

Re: Using Markdown in the core (latest core svn)

Posted: Fri Oct 13, 2006 4:00 pm
by tsw
dont know any other way than

{cms_markdown}
  foo...
{/cms_markdow}
    {news markdown=false}
{cms_markdown}
  bar...
{/cms_markdown}

or changing news template to not have indents (thats what causing the output to be broken as three spaces in the beginnning makes markdown to treat it as a code)

hope this helps

Re: Using Markdown in the core (latest core svn)

Posted: Mon Oct 16, 2006 1:29 am
by glezos
Maybe we could put this in a TODO or something?

I guess it's something that might be useful for many purposes. I mean, provide each module with an option to disable plugins when called. For example:

    {news disable="markdown"}

or
    {news disable="foo, bar"}

-d

Re: Using Markdown in the core (latest core svn)

Posted: Thu Oct 19, 2006 6:33 am
by hansom
We had a Markdown regarding in this thread, but nothing really came out of it. I've said it before, but what really would be useful IMHO is an option to set the kind of text processing on Page and/or Content Block level. That way one could specify how content should be rendered for a specific Content Block on a specific Page, e.g. with some of the wysiwig options, by Markdown or perhaps Textile, or if the text should be output simply as is. I don't know if this possible to implement, anyone?