Hi Macpraveen,
I am working on something similar and I noticed that in order for the icons to display properly the editor needs to be passed a unique id when you call it.
It seems like you might have an answer to a related question I have — I would like to fetch a wp editor on demand using ajax, but all I can seem to do with wp_editor() is echo the editor, not put it into a string to send to my javascript. How are you fetching an editor using ajax?
This is what isn’t working:
function addquestionanswerbox() {
$boxHTML="";
$boxHTML+= "<h2>Question {($number+1)} :</h2>";
$boxHTML+= wp_editor( $question_c , "qaeditorq{($number+1)}", array('textarea_name'=>"qa_question[]") );
$boxHTML+= "<h2>Answer{($number+1)} :</h2>";
$boxHTML+= wp_editor( $answer_c , "qaeditora{($number+1)}", array('textarea_name'=>"qa_answer[]") );
$result=json_encode($boxHTML);
echo($result);
exit;
I would love to hear how you did this!
Thanks
Sorry, I should have been more specific about the answer to your question:
wp_editor(“” , “uniqueid”, array(‘textarea_name’=>”textareaname”) );
should produce a functioning editor with nothing in it.
Hi guys,
Sorry to bump this question but I am also looking for the exact same solution. I tried loading the wp_editor via ajax and just get a half arsed textarea instead.
Anybody else know if there is a way?
Balthazar
Hi all,
I’m having problem with loading the_editor via ajax. is there any solution?