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

message profile
Admin
2022-03-21

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.yes

Add Message

Click on the button below to add a new message to this thread

Tags

#python #django

Thread detail

Satus: Open
Messages: 1Started: 2022-03-18
loading..

DEVMAESTERS

Newsletter

Services

Frontend Development |Backend Development |Full Website Development |Bootstrap Website upgrades | Website Debbugging | Website Hosting & deployment

Contact

Interested in hiring me or collaborating with me on a project, click on any of the links below to get my social media handle

Or contact me via Tel: (+234)-806-225-7480 | Email: abubakarzakari1703@gmail.com

Copywright@devmaesters.com
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.