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
- Django urls.py error on migration
- Filter a foreignkey field based on logged in user in Django Admin Dashboard
- flask error: flask.cli.NoAppException: Could not import "app name".
- How to upload images and videos from the same field to Cloudinary on Django Framework
- Printing all even or odd numbers between a maximum and minimum value 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.