Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
8.7k views
in Q2A Core by
It's really annoyng when someones copies text from another site  to my QnA site and text styling is same like original (color, font-family....).

How to automaticaly remove text formating without removing ckeeditor ?
by
Not sure if that is possible, but some editors do have a "paste from Word" button that removes dodgy formatting. But if you don't want formatting, why not use the plain text editor?
by
I just want basic features like bold, italc, underline text, link, link... and image insertation. cke editor is to much and pasted text html is not striped from original it pastes original text html with messy html paragraphs, fonts.... Would be great markdown editor...

1 Answer

+5 votes
by
selected by
 
Best answer

You have to add line to qa-plugin\wysiwyg-editor\config.js

CKEDITOR.config.forcePasteAsPlainText = true;

It makes CKEditor to paste always as a plain text, but you can make it bold, italic etc.

Or...

CKEDITOR.config.pasteFromWordRemoveFontStyles
Whether to ignore all font related formatting styles, including:
  • font size;
  • font family;
  • font foreground/background color.
CKEDITOR.config.pasteFromWordRemoveStyles
Whether to remove element styles that can't be managed with the editor.
 
Full config list:
by
thanks! exactly what I need. big +1!
...