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
- How to access inputed values of model fields before creation in Django admin dashboard
- FastApi error assert default is, "Path parameters cannot have a default value"
- Django: TemplateDoesNotExist (rest_framework/api.html)
- How to deploy a django project with staticfiles on vercel
- Print first n multiples of a given number using python
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.