Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
2.0k views
in Q2A Core by
Q2A version: 1.6 2

2 Answers

+1 vote
by
selected by
 
Best answer

Edit file config.js

q2a.com/qa-plugin/wysiwyg-editor/config.js add text  CKEDITOR.config.forcePasteAsPlainText = true;

/*
Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
CKEDITOR.config.forcePasteAsPlainText = true;
CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';
};
 
And edit file qa-wysiwyg-editor.php
 
Line 122
 
function get_field(&$qa_content, $content, $format, $fieldname, $rows /* $autofocus parameter deprecated */)
{
$scriptsrc=$this->urltoroot.'ckeditor.js?'.QA_VERSION;
$alreadyadded=false;
 
if (isset($qa_content['script_src']))
foreach ($qa_content['script_src'] as $testscriptsrc)
if ($testscriptsrc==$scriptsrc)
$alreadyadded=true;
 
if (!$alreadyadded) {
$uploadimages=qa_opt('wysiwyg_editor_upload_images');
$uploadall=$uploadimages && qa_opt('wysiwyg_editor_upload_all');
 
$qa_content['script_src'][]=$scriptsrc;
$qa_content['script_lines'][]=array(
"qa_wysiwyg_editor_config={toolbar:[".
"['Bold','Italic','Underline','Strike'],".
"['Link','Unlink'],".
"['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],".
"['NumberedList','BulletedList','-','Blockquote'],".
"['Image','Table','Smiley','SpecialChar'],".
"['RemoveFormat', 'Maximize','Source']".
"]".
", defaultLanguage:".qa_js(qa_opt('site_language')).
", skin:'v2'".
", toolbarCanCollapse:false".
", removePlugins:'elementspath'".
", resize_enabled:false".
", autogrow:false".
", entities:false".
($uploadimages ? (", filebrowserImageUploadUrl:".qa_js(qa_path('wysiwyg-editor-upload', array('qa_only_image' => true)))) : "").
($uploadall ? (", filebrowserUploadUrl:".qa_js(qa_path('wysiwyg-editor-upload'))) : "").
"};"
);
}
 
if ($format=='html')
$html=$content;
else
$html=qa_html($content, true);
 
return array(
'tags' => 'NAME="'.$fieldname.'"',
'value' => qa_html($html),
'rows' => $rows,
);
}

 

by
edited by
Why are you editing js file and php both? if you are editing php file than only you need to remove "['Font','FontSize'],". at line 140 in qa-whsiwyg-editor.php or you can only modify config.js file.. or even in theme file... isn't it??
by
config.js edit need to copy and paste in all the styles also copied.

Here so you only have to remove ['Font', 'FontSize']. I just copied from his file. Then I added an additional text 'Source' in "['RemoveFormat', 'Maximize', 'Source']".
by
Thank u so Much
+1 vote
by
edited by

Just delete or comment line no #140 code "['Font','FontSize'],".

in qa-wysiwyg-editor.php file in whsiwyg-editor plugin and done.. however you can do this with config.js file also as Ербол Сери said which is more prefered than modifying php file of course..

by
And for setting a default font size and name different from the default installation?
...