Select Page

Tag: ckeditor

How to add customised css to CDN hosted ckeditor

How to add customised css to CDN hosted ckeditor

Method 1 – Load CKEditor via CDN and Configure Custom CSS: <script src=”https://cdn.ckeditor.com/4.16.2/standard/ckeditor.js”></script> <script> CKEDITOR.replace(‘editor1’, { contentsCss: ‘path/to/your/custom.css’ });...
Script that will check the character count in CKEditor 4

Script that will check the character count in CKEditor 4

This following script sets an event listener on the CKEditor instance and gets triggered on every keyup event. It then retrieves the data from the editor, removes any HTML tags from it using a regular expression, and counts the remaining characters. Finally, it logs...

How to remove the p tag automatically added by CKEditor?

Use the following setting to make your ckeditor’s output p tag free that is automatically included by ckeditor.whenever you start writing something. autoParagraph: false, CKEDITOR.replace(‘editor1’, { uiColor: ‘#dadada’, height: 250,...
Hot to allow using all HTML tags in CK Editor 4

Hot to allow using all HTML tags in CK Editor 4

You need to add these settings where you have initiated editor. CKEDITOR.replace(‘ckeditortextarea’, { allowedContent: true, fullPage: true, }); or by this method.. var config = CKEDITOR.replace( ‘editor1’ ); config.allowedContent = true;...