I completely rewrote my Enhanced Textarea field:
It’s using the amazing
SimpleMDE Markdown Editor, customized and optimized for Kirby.
Live Markdown highlighting. Including green Kirbytags.
Undo/redo via Ctrl/⌘ + Z/Y.
No modals for URLs and email addresses as this prevents the buttons from showing in structure fields.
Automatic link/email detection when selecting text and using the link or email button.
Easy to add custom buttons
Sticky toolbar on the top for better reachability
Looks great. Is it possible to disable the green highlighting with a config setting? Looks like it has no page button anymore…
Disabling the green highlighting is not possible right now, but I will add an issue and try to add this functionality. I might be able to optimize the visuals though — why exactly do you want to disable it?
I want to completely move away from modals for this rewrite. That’s why the page button is not yet implemented. I have a local proof-of-concept displaying the page list inside the toolbar. Keep an eye on this issue:
For me, it would be too distracting from the content to have highlighting within the text.
I definitely will
I hope you will continue with this field to future versions of Kirby as well.
@texnixe I added an option to disable the Kirbytag highlighting:
@jenstornell Thank you! I hesitated at first because of Kirby 3 — maybe this field will not even be needed anymore. But I thought it would be a great project for my first Kirby 3 plugin. It’s very straight forward and not as bloated as the Enhanced Textarea.
I added an option to disable the Kirbytag highlighting:
Wonderful! You are fantastic!
I have now implemented a completely different page link functionality and released
(and some more chars)
This is amazing! No more reason to feel wary of using kirby builder for text-heavy blocks!
(though I’m sure Kirby 3 will implement a kirby-builder system built-in
how would you go to implement a custom button?
I need to add one for the
code syntax (by using inline code like `text`).
Should I extend
@afincato I just added a
code button in the
editor.js and released
As there is already a code function in SimpleMDE it was very easy. But adding more buttons is quite straight forward too. Just have a look at the existing button functions.
Great thank you.
editor.js is the file to work with whenever you want to extend the plugin with custom buttons? Cool. Will look at simplemd’s readme as well.
When you use this plugin on a textarea with
validate: minLength/maxLength the counter does not count up/down any more …
@raschid I just added the live validation script and released version 1.3.11.
Please let me know if this works for you.
@thguenther tried it on 2.5.5 and validator-count works on normal textarea and on textarea in a modal (structure).
Validator maxLength works as expected. Thanks!
And the Problem I hat this morning (
issues in simpleMDE
i found a bug… im using kirby version 2.5.8
When SimpleMDE field is on, it makes the whole edit area super wide.
SimpleMDE seems to not find the
translation.json files because the path set is wrong.
I am not using any custom routing.
Happening only to me?
It works for me.
If it can’t find the
translation.json on your installation, it probably won’t find the
index.json for the page link search either.
Can you access the files directly?
The panel routes are defined in
line 16 and line 33 of the simplemde.php and a data-json attribute with the url is added to the field.
Maybe there’s a better way of adding panel routes? I couldn’t find anything in the documentation about that.
Yes, I cannot use the search page inline toolbar as well.
How can I go about to debug it? I installed it with