Markdown Extra doesn't work

Hi, I wanted to use more Markdown Features.
I’m new to KirbyCMS and learning PHP (again) right now. Last Time I used PHP was 2015.

I was looking into the following Links:

I want to understand how to load/activate a plugin, that I can use it in the panel
Right now I have a Plainkit loaded with composer. To find out why it is not working to load the markdown extra even in a fresh plainkit.

I have this code written in my config.php

<?php
return [
    'debug'  => true,
    'markdown' => [
        'extra' => true
    ],
];

1Q: If I use Kirby with Composer, all the plugin data will be loaded from root/vendor/ directory?

2Q: Is a plugin file needed then in site/plugin/“pluginName”/ and an index.php file as well?

3Q: The old question of another user confused me. How I load Kirby-Plugin with composer, if the goal of composer should be to make all requirements running?

Sadly, I couldn’t find a video what shows me a little deeper how to get plugins running. → Is there something like that?

best reagrds
ET

Hi ET,

composer helps you manage dependencies and updates of components of your kirby installation. You can use composer to install plugins (if they support that installation method). After you installed a plugin using a command like composer require username/pluginname the plugin is installed and you don’t have to do anything else to activate it.

But most plugins come with extra settings you have to configure, those have to be set in your config.php file. Most of the time a plugins README tells you how to install it via composer and what config options have to be set.

As far as I now, you don’t have to install anything addionally to get markdown extra running, as this is just a config option and already implemented in kirby.

Hope that helped a little bit.

1 Like

Hi,

thanks for the basic information.
If I use it like written in the readme.md I get an infinite loop. If I add the command:

require 'vendor/autoload.php';

Because the file loads itself again, again and again …

File: vendor/autoload.php

<?php

// autoload.php @generated by Composer

require_once __DIR__ . '/composer/autoload_real.php';
// require 'vendor/autoload.php   //not good idea to do that

return ComposerAutoloaderInit6cc5f2042b8b4366e64fccdea6a288b9::getLoader();

Now I was trying again to use this answer Link

But still, my textarea looks like this:

What do I miss? Suggestions?

best regards
ET

If I understand you correctly, you want to replace Kirby’s markdown parser (Parsedown/ParsedownExtra) in a plugin with GitHub - michelf/php-markdown: Parser for Markdown and Markdown Extra derived from the original Markdown.pl by John Gruber.? If so, may I ask why? What Markdown Extra features do you need that are not supported in Kirby’s markdown parser?

Hi texnixe,

I need features for example tables and def-list. I understood in the Kirby Reference Markdown that I just have to activate the markdown.extra with adding the code lines into site/config/config.php file. You can see the code snippet of my config.php at the top.

But that didn’t work. Then I was trying to figure out why and ended up in trying to replace the parser. But If this is for markdown extra not needed, then why is my fresh Kirby plain kit (V 3.6.2, loaded with Composer command) not showing more markdown options in my textarea?

Best regards
ET

The markdown extra feature are not available as options in the textarea. If Markdown Extra is enabled, you can nevertheless use the features.

1 Like

Ok. It worked.
The config.php entry for markdown extra was enough.

Thank you for help! (@texnixe , @mauricehh )
Sometimes it is simpler than expected.

Best Regards
ET