I want to create a block type that has a couple of fields, a template and attached js.
I want that the user in my site will be able to create blocks of this type just like they create a custom block : through /block/add/myBlockType
I would like ideally to have it all done programmatically but I dont mind manually creating my block type though "admin/structure/block/block-content/types" or with configuration files.
The thing is I have been scraping google for two days already and I dont manage to figure out how to programmarically create a block type
And this that the information is not easily found on google makes me think that instead I need to create my type with configuration and then apply my plugin on creation of a new block but im still not sure how to do that and what my plugin needs to extend.
Can anyone give me a hint!
Thanks a lot.