Skip to content
Grav 2.0 is officially stable. Read the announcement →
Plugins

Replace Markdown Image ![]() Code

Started by finrik 8 years ago · 1 replies · 686 views
8 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!

8 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 Mathieu Lecouturier, 6 days ago
3 130 3 days ago
Plugins · by Slebeig, 4 weeks ago
1 296 4 weeks ago
Plugins · by Rene, 2 months ago
2 454 2 months ago
Plugins · by Xavier, 2 months ago
2 373 2 months ago
Plugins · by Luka Prinčič, 7 years ago
3 1595 2 months ago