helloflask / flask-ckeditor

CKEditor integration for Flask, including image upload, code syntax highlight, and more.
https://flask-ckeditor.readthedocs.io
MIT License
197 stars 67 forks source link

codesnippet plugin 404 with CKEDITOR_SERVE_LOCAL = False #47

Closed jiamo closed 3 years ago

jiamo commented 3 years ago

with CKEDITOR_SERVE_LOCAL = False CKEDITOR_ENABLE_CODESNIPPET = True CKEDITOR_PKG_TYPE = 'full'

It can't get codesnippet default.

Request URL: https://cdn.ckeditor.com/4.14.0/full/plugins/codesnippet/plugin.js?t=K24B
Request Method: GET
Status Code: 404 
Remote Address: 204.93.150.153:443
Referrer Policy: strict-origin-when-cross-origin
jiamo commented 3 years ago

replace

 {{ ckeditor.load() }}

with

 <script src="https://cdn.ckeditor.com/4.16.0/full-all/ckeditor.js"></script>

works fine.

Does this mean we need option full-all in CKEDITOR_PKG_TYPE ?

remyzandwijk commented 3 years ago

I think you are right. According to https://ckeditor.com/cke4/presets-all, the code snippet plugin is only available in the standard-all and full-all versions of the CDN. These 'all' packages are not downloadable, as far as I can see, so we need a mechanism that PKG_TYPE allows standard-all and full-all only when CKEDITOR_SERVE_LOCAL = False. @greyli what do you think?

greyli commented 3 years ago

so we need a mechanism that PKG_TYPE allows standard-all and full-all only when CKEDITOR_SERVE_LOCAL = False

Sounds reasonable, I will make a PR for it.

greyli commented 3 years ago

Fixed and released 0.4.6.