Removing Text Formatting Documentation
The text formatting cleanup functionality is provided through the Remove Format plugin which by default is available in the Standard and Full distributions.
When the plugin is enabled, the basic text styles (bold, italic, etc.), font family and size, text and background colors or styles applied through the Styles drop-down. Note that it does not change text formats applied at block level.
button is automatically added to the toolbar. You can use it to remove any text formatting that is applied through inline HTML elements and CSS styles, likeSince this feature applies to inline styles, you need to select the text fragment whose formatting is to be removed.
Related Features
- Styling and Formatting – Basic Text Styles: Bold, Italic and More
- Styling and Formatting – Copying Text Formatting
- Styling and Formatting – Applying Styles to Editor Content
- Styling and Formatting – Setting Text and Background Color
Get Sample Source Code
- Removing text formatting
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="robots" content="noindex, nofollow"> <title>Removing text formatting</title> <script src="https://cdn.ckeditor.com/4.25.0-lts/standard-all/ckeditor.js"></script> </head> <body> <textarea cols="80" id="editor1" name="editor1" rows="10"><p>This is some <strong>sample text</strong>. You are using <a href="https://ckeditor.com/">CKEditor</a>.</p></textarea> <script> CKEDITOR.replace('editor1', { height: 250, // Adding Text and Background Color, Font Family and Size buttons to make sample // text styling more spectacular. extraPlugins: 'colorbutton,font', // By default, some basic text styles buttons are removed in the Standard preset. // The code below resets the default config.removeButtons setting. removeButtons: '', // Rearrange the toolbar slightly. toolbarGroups: [{ name: 'clipboard', groups: ['clipboard', 'undo'] }, { name: 'editing', groups: ['find', 'selection', 'spellchecker'] }, { name: 'links' }, { name: 'insert' }, { name: 'forms' }, { name: 'tools' }, { name: 'document', groups: ['mode', 'document', 'doctools'] }, { name: 'colors' }, { name: 'others' }, { name: 'about' }, '/', { name: 'basicstyles', groups: ['basicstyles', 'cleanup'] }, { name: 'paragraph', groups: ['list', 'indent', 'blocks', 'align', 'bidi'] }, { name: 'styles' } ], removeButtons: 'PasteFromWord' }); </script> </body> </html>