Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+4 votes
in Plugins by
edited by

Before I was using WYSIWYG editor on my site and I remember some where I changed a setting to make all pasted content text only.

Today I installed SCEditor, but I canĀ“t find how to do the same.

The problem is that some users copy and paste code from other sites and it comes with all html and looks bad.

Note: I'm using SCEditor not CKEditor

Thanks for your help.

3 Answers

+1 vote
selected by
Best answer

then another answer for this editor. The previous one is still available for CkEditor

look for enablePasteFiltering  in www.sceditor.com/documentation/options/

enablePasteFiltering bool Defaults to false
With the BBCode plugin this will cause any HTML without a valid BBCode to be stripped.


Thanks Leo, I will try the BBCode plugin.
0 votes

you must add a line to the ckeditor configuration file

open qa-wysiwyg-editor.php and just before :

                // Set language to Q2A site language, falling back to English if not available.
                "    defaultLanguage: 'en',",

insert this line

                "   forcePasteAsPlainText: true,",


Hi Leo, thanks for your reply, just to let you know that I'm using SCEditor not CKEditor.
I've updated my question.
0 votes
As noted, it only works for BBcode not for HTML. And even with bbcode there is a bug.

I asked Sam, the sceditor developer to implement it for HTML as well and gave him some code suggestions. This is the recent state: https://github.com/samclarke/SCEditor/issues/334