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 setup environment variables for Django projects
- Migrating your PostgreSQL database from one hosting platform to another (e.g Heroku to Supabase)
- Part 4: Building a User-Friendly Todo App with Flask - Step-by-Step Guide to Perform Form Submissions via POST Requests
- Hosting PostgreSQL database on Supabase for free
- FastApi error assert default is, "Path parameters cannot have a default value"
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.