Joomla JCE editor not loading in page loaded with Ajax -


i have joomla 1.5 component uses call editor class display jce editor joomla instead of textbox. code part of 4 step form each step loading using ajax. last step contains message field users can write free text , calling using following code:

$editor =& jfactory::geteditor(); echo $editor->display('description', $description, '100%', '150', '40', '30'); 

when step displayed, shows simple textbox without buttons format text etc. understand must issue javascript, having hard time finding how can trigger proper code textbox formatted properly.

i have attached screenshot of how field looks like. description field loaded via ajax

and here html generated firebug:

<!-- start editor --><label aria-visible="false" style="display:none;" for="description">description_textarea</label><textarea wrap="off" class="wfeditor source" style="width:100%;height:150px;" rows="30" cols="40" name="description" id="description"></textarea><input type="hidden" value="1" name="wf3fadc9c48cabc28750287fe69c3d08c4" id="wf_description_token"> <div id="editor-xtd-buttons"> <div class="button2-left"><div class="image"><a rel="{handler: 'iframe', size: {x: 570, y: 400}}" onclick="iecursorfix(); return false;" href="http://localhost/ugparl/site/index.php?option=com_media&amp;view=images&amp;tmpl=component&amp;e_name=description" title="image" class="modal-button">image</a></div></div> <div class="button2-left"><div class="pagebreak"><a rel="{handler: 'iframe', size: {x: 400, y: 85}}" onclick="iecursorfix(); return false;" href="http://localhost/ugparl/site/index.php?option=com_content&amp;task=ins_pagebreak&amp;tmpl=component&amp;e_name=description" title="pagebreak" class="modal-button">pagebreak</a></div></div> <div class="button2-left"><div class="readmore"><a rel="" onclick="insertreadmore('description');return false;" href="http://localhost/ugparl/site/#" title="read more">read more</a></div></div> </div> <!-- end editor --> 

thank in advance can provide.

this not solution workaround. due cleaning headers before displaying page, code generated jce lost. adding following code page called ajax, able trigger jce initializer , display editor correctly.

$document =& jfactory::getdocument(); echo "<script type='text/javascript'> function loadjce() {"; echo $document->_script["text/javascript"]; echo "} </script>"; 

then called loadjce load complete function.

again, not best way did trick me.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -