Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Replace Markdown Image ![]() Code

Started by finrik 9 years ago · 1 replies · 930 views
9 years ago

Hello

I wrote an image insert plugin: [plugin:image](). However, I would prefer to overwrite the normal markdown image code.

So that I can write instead of plugin:image and the plugin is still work.

Thank you very much for your help!

9 years ago

If you search the plugin list for markdown, you'll see a number of extender plugins that hook onto the onMarkdownInitialized event (see the Grav Lifecycle page).

I'm not seeing explicit examples of overriding existing syntax, but I presume your plugin would run first, so you could hijack any instances of ! and do your thing before standard Markdown takes over.

Suggested topics

Topic Participants Replies Views Activity
Plugins · by DrPen, 1 month ago
2 402 4 weeks ago
Plugins · by renedebaaij, 1 month ago
1 306 1 month ago
Plugins · by Thomas, 1 month ago
1 330 1 month ago
Plugins · by complanar, 2 months ago
6 655 2 months ago
Plugins · by BenLaKnet, 2 months ago
1 581 2 months ago