Closed samzhangjy closed 4 years ago
Hi, sorry for the later response. Although Code Snippet is one of the CKEditor preset plugins, but it not available on the CKEditor CDN. You have to load it from the local:
{{ ckeditor.load() }}
{{ ckeditor.config(name='body') }}
<script>
// Enable local "codesnippet" plugin from /ckeditor/static/standard/plugins/codesnippet/ path.
CKEDITOR.plugins.addExternal( 'codesnippet', '/ckeditor/static/standard/plugins/codesnippet/', 'plugin.js' );
</script>
Oh, now I got it. I will try it later, thanks a lot!
On Apr 20, 2020, at 5:12 PM, Grey Li notifications@github.com wrote:
Hi, sorry for the later response. Although Code Snippet is one of the CKEditor preset plugins, but it not available on the CKEditor CDN https://ckeditor.com/cke4/presets-all. You have to load it from the local:
{{ ckeditor.load() }} {{ ckeditor.config(name='body') }}
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/greyli/flask-ckeditor/issues/30#issuecomment-616417517, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANQCYENIKPAZPMKIIPFIYO3RNQGWHANCNFSM4K3G6GKA.
Hello! I'm using flask-ckeditor==0.4.3, and when I enabled
CKEDITOR_ENABLE_CODESNIPPET = True
, the editor disappears. But when not enable that, the editor can show up normally.I also checked the console in the browser, and I got the following error:
Error: [CKEDITOR.resourceManager.load] Resource name "codesnippet" was not found at "http://cdn.ckeditor.com/4.9.2/standard/plugins/codesnippet/plugin.js?t=I3I8".
How can I solve this? Thank you!