Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
926 views
in Q2A Core by
Hi QA Gurus

 

Can we add HTML Tags in WYSIWYG editor ? If not how can we enable this editor to add HTML tags?

is there any plugin for that?

Thanks

sam

1 Answer

0 votes
by
I think that there is no plugin. But method to hack "wysiwyg-editor" plugin is possible. You can admit the input of HTML code by below method.
 
qa-plugin/wysiwyg-editor/qa-wysiwyg-editor.php (get_field() L136 [case V1.5.4])
require_once QA_INCLUDE_DIR.'qa-app-users.php';
if (qa_get_logged_in_level()>=QA_USER_LEVEL_EDITOR) {
  // for users who have higher editor authority
  $qa_content['script_lines'][]=array(
    "qa_wysiwyg_editor_config={toolbar:[".
      "['Source'],".  // <- add HTML source plugin of CKEditor
      "['Bold','Italic','Underline','Strike'],".  // <- Original code
    ...
} else {
  // for general users
  $qa_content['script_lines'][]=array(
    "qa_wysiwyg_editor_config={toolbar:[".
      "['Bold','Italic','Underline','Strike'],".  // <- Original code
    ...
}
Caution)
"wysiwyg-editor" plugin may be changed by update of Q2A. Therefore, you must be careful at the time of update Q2A. When you admit HTML regardless of user level, security level of your site decreases surely. You should admit the input of the HTML code only when the case that there is your site in the closed space that was protected by fire wall such as intranet and all registered user are reliable.
...