Custom editor block plugins name


I’m looking to extend additional and custom editor blocks. What I’ve discovered is that the folder name that houses my custom blocks in the /site/plugins folder has to be alphabetically before the “editor” plugin.

For example, if you were to copy the info-block block from the examples folder into the plugins directory, you’ll get the error “The field type “xxx” does not exist”. But if you were to rename the folder to something beginning with ‘a’, for instance, it works!

Could you please confirm this, or am I seeing things? :fearful:

Thank you!

Edit: I’m so sorry, it’s actually the complete opposite! The custom editor blocks directory has to be after the editor directory alphabetically. I suspect it’s to do with the editor.block method being called before the editor plugin…

I often have the same problem, also with regular plugins … also very interested what causes this problem!

Hi, good question :slight_smile:

I’ve been struggling with this in the past as well, and there’s been effort from the Kirby team to help us with this. TBH I didn’t play with this yet :face_with_hand_over_mouth:, but here are some links that can help you getting started:

I would like it if you get back here with how you’ve set up your case and how it works :+1:

1 Like

We could not find a solution. Despite trying to use system.loadPlugins:after hook to load a plugin, results was still the same.

We just ended up renaming the folder with an editor- prefix to ensure it will load after getkirby/editor plugin :grimacing: