Extensible markdown editor with preview

One of the plugins i would love to see and probably will have to try to make it some day.

Kirby text editor is fine but doesn’t have preview and i would like to add own buttons for generating custom kirbytags. Clients are usualy fine with markdown but they will never remember syntax for custom kirbytags which we need for some things.[details=Sidenote]This could somehow be separated into differend field that just generates markup and you paste it to any editor, but preview is also important so you might aswell merge functionality of the two.[/details]

Editors like YAKME have strange inline previews and i think its more confusing than it is helping (you make headline big and bold but there are still those ## in front of it). Its wierd mix of wysiwyg and plaintext.

Plaintext editor where you can add custom buttons for generating custom markdown/tags (maybe even with little popups for selecting images etc) and separate uneditable preview. Either two pane or preview that that you switch on.

Biggest problem:
Since preview will be rendered on client with JS - both kirby and frontend JS have to understand your custom syntax and somehow parse it :).

Maybe the Yakme plugin will help you with the preview part. Scroll down in the repo for screenshots. For the preview part you can also use Reveal. It will preview the whole page when editing the text (but not in a multi language setup yet).

About the custom buttons for kirbytext tags I think it would be a great idea to have a new API in the core where plugins can add buttons to the textarea editor.

Now it’s required to create a new plugin for a new set of buttons. An example is Enhanced textarea. While it’s a great plugin, I would prefer to have the ability to add a button on the native textarea with a plugin “hooked” into the buttons bar. Then I could for example have a Wikipedia plugin which add a button that creates (wikipedia: somevalue). Another plugin could add another tag. To have them sorted, it could be possible with an array in a config value with the key panel.textarea.buttons.

That way every possible feature does not need to be in one single plugin.

I didnt know about enhanced texarea, thats pretty nice.

YAKME is unfortunately full of little pesky bugs. I think something like that is hard to maintain (integrating one codebase that you dont know into different codebase that you dont know) and i don’t envy the maintainer.

Text area is such a general core thing that i agree that it might be something core devs take upon themselves.