We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10487 MODX Staff
    • 1,535 Posts
    Hi,

    Looking at the phpMarkdown instructions, I think the following plugin should work - set it to run on the ’OnWebPagePrerender’ event:

    // phpMarkdown integration
    
    $e = &$modx->Event;
    
    switch ($e->name) {
    	case "OnWebPagePrerender":
    	include_once("markdown.php"); //change path to where the markdown script is located 
    	$pg=&$modx->documentOutput;
    	$modx->documentOutput = Markdown($pg);
    	break;
    	default:
    	return;
    	break;
    }


    I’ve not tried this yet but, in theory, should work. wink

    Cheers, Garry
      Garry Nutting
      Senior Developer
      MODX, LLC

      Email: [email protected]
      Twitter: @garryn
      Web: modx.com
      • 6726
      • 7,075 Posts
      If it’s as simple as that, then it’s truly a testimony of MODx power smiley

      Berlueur, could you try that and report ?
      Thanks !
        .: COO - Commerce Guys - Community Driven Innovation :.


        MODx est l'outil id
        • 3153
        • 12 Posts
        Yeah, I have made my "own" Markdown plugin after posting my message and before reading the responses here... (by totally ripping off Raymond Irving’s plugin).

        I’m actually a bit excited to have "made" my first MODx plugin... so much so that I made a little package.

        (BTW, MODx thoroughly rocks...)

        The plugin lives here.
          • 32241
          • 1,495 Posts
          Quote from: Berlueur at Feb 27, 2006, 11:24 AM

          Yeah, I have made my "own" Markdown plugin after posting my message and before reading the responses here... (by totally ripping off Raymond Irving’s plugin).

          I’m actually a bit excited to have "made" my first MODx plugin... so much so that I made a little package.

          Here goes.

          (BTW, MODx thoroughly rocks...)

          Did you post it somewhere on the forum? Please make a new topic with [Plugin] as the prefix of the title, and name the plugin, so we can add it to the repository wink Good job with your first try...

          Have fun with MODx! grin
            Wendy Novianto
            [font=Verdana]PT DJAMOER Technology Media
            [font=Verdana]Xituz Media
            • 3153
            • 12 Posts
            Yes, it is attached to my post, just above...

            I will make a new topic, although it feels a bit strange since I did almost nothing...
              • 34162
              • 1 Posts
              I download the package and follow the readme but when I edit to document the FCKeditor kick in and I don’t see any markdown stuff even I set FCKEditor to no in the system config.

              What am I missing?

              Thanks
                • 6726
                • 7,075 Posts
                Maybe the little instructions I wrote for the Textile plugin will help, since the principle is similar.

                Just modify <textile> and </textile> by <markdown> and </markdown> (that is, if berlueur followed the same logic , didn’t test this one yet).

                Hope this helps !
                  .: COO - Commerce Guys - Community Driven Innovation :.


                  MODx est l&#39;outil id
                  • 3153
                  • 12 Posts
                  Yes, Markdown directives need to be enclosed in <markdown> </markdown tags.
                    • 6726
                    • 7,075 Posts
                    Yeah well let’s also mention there is a ReadMe in the distributed plugin smiley

                    Berlueur, so that everyone downloads the right version, I suggest you take your download off this thread and keep only one on your the official plugin post smiley

                    This will avoid confusion and mistakes tongue

                    Anyway, great work this is very nice having Mardown working grin

                      .: COO - Commerce Guys - Community Driven Innovation :.


                      MODx est l&#39;outil id
                      • 34162
                      • 1 Posts
                      I put <markdown>[*content*]</markdown> in the template and it works but I did the same thing for <textile></textile> but for some reason it does not work the tag that tried.