Populate Block UI with an Ajax call
scriptamanent opened this issue · 1 comments
Hello everybody, we start to use SirTrevor in a new project instead of CKEditor.
I'm creating some custom blocks to add galleries, videos and pictures from our database.
Is possible to call an api inside the Block UI? So we can search for an image, get the image list and choose the image or the element di inset into the editor?
Thank you
So long as you can serve up a list of files from the server, you can create a new custom block to handle this (I've done this myself using a previous project I'd written for CKEditor to serve a gallery up so I could select images so I know it's possible) but it does require some effort on your side since you need to build the custom block (quite easy) with a gallery (I recall using image picker ) and getting it to pull a list of files from your server, if you have an API that serves up a list of images then great use that, if not develop one yourself (after all we don't know what/how your server can provide image wise and we're not going to do all of your work for you).