The problem seems to be, that every route that ends with */files is processed by the kirby core - even if I try to handle them inside my plugin. The Kirby Builder plugin needs to define custom endpoints for most of the api communication. I use the prefix /api/kirby-builder for these custom endpoints. This works fine for the files and pages field.
The textarea field, however, takes the custom route given by the endpoint object, and puts a /files after it which ends in a route that could look like this: /api/kirby-builder/pages/test+page/fields/builderfieldname+fieldsetname+fieldname/files . This route can not be handles by my plugin anymore, because the kirby core tries to handle it before (and throws and error because it does not understand my custom route in front of the /files part.
Maybe @distantnative or anybody more involved in the kirby core has an idea for a work around so that either the textarea can be configured not to use the /files route or the */files route to be processed by my plugin?
It would be really great of one of the developers (@lukasbestle, @bastianallgeier, @distantnative) could take the time and give me some feedback on this. Unfortunately, I am some kind of dependent on your support here because this leads to an issue in my plugin.
@timoetting Does the textarea field need a custom endpoint within your field or would it be an option to try to make it work with the normal endpoint, while still having custom ones for the files and pages fields?
One vote here for maybe raising priority for this issue. Page Builder is a great plugin, most used among plugins, and this issue is making its progress stall.
Im not smart enough to understand the internals, but the workaround seems to bypass the routes by kirby-builder in case it registers a textarea in a block and instead routes it through somewhere else? Maybe this is a starting point?