Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
  • Register
Welcome to the Q&A for Question2Answer.

If you have questions about the platform, click here to ask and please use English.

If you just want to try Q2A, please use the demo, which also grants admin access.

Apr 29: Q2A 1.5.2

Best way to add button to ask question page, to insert ajax content in ckeditor?

0 votes

using the jQuery adapter for CKEditor , its pretty easy to insert content into the textarea using the enhanced jQ val method .. for instance 

$("textarea[name='content']").val("text/html content here");

our plan is to add a button to the Ask Question page .. the button will pull in some context sensitive string stuff via Ajax and insert it in the textarea of editor. .. so it becomes part of the Q/A thread

my question is ( being new to platform :-)  ..what's the best way to add  jquery ajax and button code to the question ask page?  

should I work in our custom qa-theme.php?  .. or in one of the files in the include area? .. like someplace related to Stage 3 of the ask-a-question page controller

many thanks..  

 

 

asked May 12, 2011 in Q2A Core by case42
some notes on the include files and config settings for the jQuery / CK adapter here:  

http://www.question2answer.org/qa/6364/cant-seem-to-set-content-in-editor-with-val-method

Please log in or register to answer this question.