Code52 / DownmarkerWPF

MarkPad - a visual Markdown editor (inspired by the Downmarker project)
http://code52.org/DownmarkerWPF/
Microsoft Public License
1.4k stars 458 forks source link

Plugin for custom md parsing #395

Closed SimonCropp closed 6 years ago

SimonCropp commented 11 years ago

Lets say i want to do some custom parsing of the markdown, as in extend it. Is it possible to use the plugin model of markpad to do this?

shiftkey commented 11 years ago

Afraid not, we just shell out to MarkdownDeep.

I haven't looked at the plugins in a long time, so perhaps @JakeGinnivan might drop in and see if this is something he's thought about.

JakeGinnivan commented 11 years ago

Yeah, the plugins are kinda incomplete. If the plugin model got a bit of love, then maybe. I think the interfaces are there, but how do you distribute them etc?

We use clickonce at the moment, so extensions will not really work. Maybe if they were loaded from a fixed location, for example %appdata%/MarkPad/Extensions it could work

SimonCropp commented 11 years ago

@JakeGinnivan read from nuget?

JakeGinnivan commented 11 years ago

Sure, an extension manager would be cool. But work :P Personally I don't have the time to do that, but if your keen :)

SimonCropp commented 11 years ago

@JakeGinnivan ask for the world and you get the "send us a PR" response :)

I will settle for %appdata% :)

by how about get MEF to scan %appdata%/MarkPad/*Plugin.dll I dont see the need for Extensions

JakeGinnivan commented 11 years ago

Sounds good to me :)

Then some UI which simply lists the running extensions. I was thinking that will be far less work, also not sure when I will get to this. VSTO Contrib and White both have large releases in the pipeline at the moment, and want to finish them off first

SimonCropp commented 11 years ago

the other (easier) option is to just support @shiftkey s scribble codesnippets imports OOTB. But have it turned off by default. http://shiftkey.github.io/scribble/pages/features/code-snippets.html

I am starting to think this would be better. thoughts?

JakeGinnivan commented 11 years ago

Back to you @shiftkey

SimonCropp commented 11 years ago

@JakeGinnivan BTW I already have a spike of this working in Markpad. it is way cool :)

SimonCropp commented 11 years ago

also @distantcam might have some input

distantcam commented 11 years ago

Plugins are work. The API needs to be versioned, the plugins need to be run in a separate app domain to avoid crashes taking down the whole app, and installation is tricky and annoying. Also by supporting plugins the overall architecture is compromised in order to expose said plugin points. And finally plugins lead to bloated systems.

Personally I'd prefer to do away with the plugin system. Markpad should focus on being one thing, a damn fine markdown editor.

Yeah, I might have some input. :P

distantcam commented 11 years ago

If you do want to modify the output, do you want to do it pre or post markdown->html conversion?

The DocumentParser is where we convert the document. Already it does some pre and post processing and that's where I would add any custom hooks.

SimonCropp commented 11 years ago

I need pre processing. I already have it working. Just need to know how u guys want the pull request

distantcam commented 11 years ago

Do it straight into the code. Don't worry about making it a plugin.

JakeGinnivan commented 10 years ago

What is happening with this?