I want to add an "onclick" event on a span/table row of Question-content. I couldn't found a way to view/edit HTML code of question written in ckeditor.
Then, I tested, if putting an html text with "onclick" event on div/span/tr directly from database, is working. But, when I view the question in browser, it seems "onclick" event seems to be omitted in final output.
for e.g., i added following in the content column of qa_posts (and I have already set format column of qa_posts to html) -
<span id="test" class="test" onclick="alert('hello');">This is a Test Question.</span>
In normal html file, it returns an alert box when clicked; but when I tested it in Q2A, onclick did not trigger. So, I checked the source code for that question and it was -
<span id="test" class="test" >This is a Test Question.</span>
The onlick event was removed while displaying, but its present in database.
Why is that? and how to add it?