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

How i add for 1.7 editor ckeditor(wysiwyg) auto delete text format forcePasteAsPlainText?

I use last version q2a 1.7. In ckeditor setting i add config.forcePasteAsPlainText = true; but its not work.

Please help. How i use in ckeditor use forcePasteAsPlainText ?

 

Q2A version: 1.7

1 Answer

+1 vote
by
selected by
 
Best answer

This was a bit harder than I originally thought. Follow these steps:

1. Locate qa-wysiwyg-edidtor.php file

2. After this line:

" language: " . qa_js(qa_opt('site_language')) . ",",

Add this line:

" forcePasteAsPlainText: true,",
 
Now the feature you're after comes with a CKEditor plugin (http://ckeditor.com/addon/pastetext) that is NOT part of the CKEditor released with Q2A v1.7. So you have to install the plugin or generate a new build. I've already generated a build to make the test using the exact same configuration as the Q2A v1.7 release uses and here is the link: http://ckeditor.com/online-builder/releases/minified/4.4.6/moono/4.4.6/ckeditor_4.4.6_a3564c139333.zip .
 
All you need to do is to replace the folder qa-plugin/wysiwyg-editor/ckeditor with the folder ckeditor in the downloaded link. In case you've made other customizations to your CKEditor, of course, you will have to apply them too.
by
Thanks. Its work. Please add this function in github q2a comunity.
by
Pupi1985 how i add Source botton. I add

{ name: 'last', items: [ 'RemoveFormat', 'Maximize','Source' ] }",

but its not work
...