ckeditor.js error exportpdf-no-token-url in django
When I try to render CKEditor in html page, I always get the error : ckeditor.js:21 [CKEDITOR] Error code: exportpdf-no-token-url in the browser console and the data fails to submit
The function of the export to pdf CKEditor 4 plugin is to allow you to easily print the WYSIWYG editor content to a PDF file.
According to the plugin documentation, the error is occuring because the exportPdf_tokenUrl configuration variable for the CKEditor export to pdf plugin was not specified.
A quick fix when you know your're not going to use the export to pdf option in your editor is to diable it.
That can be done by adding this line of code to your CKEditor configuration settings in settings.py
'removePlugins': 'exportpdf',
For example, after adding the code above your CKEditor configuration should look like this depending on the other configuration settings you have added before;
CKEDITOR_CONFIGS = {
'default': {
'skin': 'moono',
'toolbar': 'basic',
'height': 'full',
'width': 'full',
'removePlugins': 'exportpdf',
'toolbarCanCollapse':'true'
},
}
I hope this fixes your error.
Similar Content
- Vercel django error: ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3
- Print first n multiples of a given number using python
- How to deploy a django project with staticfiles on vercel
- Django: TemplateDoesNotExist (rest_framework/api.html)
- Django error value too long for type character varying(50)
Privacy Policy
By using our website,
you agree that devmaesters can store cookies on your device and disclose information in accordance with our privacy policy.