1

I need to create a generic file upload plugin (pdf, docx, ...) that uploads to a server and resolves the link in the document

Is this possible? I found a bunch of 'solutions' in the last 2 weeks but whenever they use the word 'file', it ends up being images only.

Although a file browser/manager would be the best solution, it seems I can't use CKFinder since the backend must be flask and CKFinder only has certain connectors (php, coldfusion, ...)

I am sorry for the open-ended question but I am uncertain how to solve this properly.

PS: Custom builds do not seem to be supported directly as indicated by the introduction of the next link, but it looks like there could be a possible solution if CKEditor isn't implemented in a 'clean' way? https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/angular.html

davidism
  • 121,510
  • 29
  • 395
  • 339
Matthew
  • 276
  • 2
  • 3
  • 15
  • Was this question ever properly answered? I must be blind or is there really no way to upload anything else than images? Would love to embed audio files into the content. I also have the image upload working (custom) and the same handler could handle audio files. But how to get CKEditor to accept them?! – Dev Ze Aug 11 '22 at 16:40

1 Answers1

0

CKEditor 4 provided some hooks to allow you to add your own custom file browser and connectors: https://ckeditor.com/docs/ckeditor4/latest/guide/dev_file_manager_configuration.html This is what we used to roll our own file browser.

I think this is what you're looking for in CKEditor5 https://ckeditor.com/docs/ckeditor5/latest/framework/guides/deep-dive/upload-adapter.html#implementing-a-custom-upload-adapter

Jason Holden
  • 168
  • 3
  • 10
  • Thank you for the answer, but as I hinted at in my question, I implemented a custom upload adapter but it's for images only. – Matthew May 15 '19 at 01:44
  • The connector on CKEditor 4 looked promising but I know of no popular/trustable file managers for flask – Matthew May 15 '19 at 01:55
  • Have you tried creating a custom connector for CKFinder? CKEditor and CKFinder are both independent of the back end so using Flask shouldn't be an issue. I realize there's not a built-in Flask example, but based on the the PHP sample: https://ckeditor.com/docs/ckfinder/ckfinder3-php/integration.html You'd simply need to change the URL endpoints to your Flask based endpoints. Your Flask based endpoints would need to return the proper responses. – Jason Holden May 15 '19 at 21:18