The best place to check for the solution is tinyMCE resources. We do not repeated all the info which could be found there. As we not changed the functionality of widget itself but just wrapped it to JSF component - all the options and handlers desribed at tinyMCE documentation is available.
Thank you for replay, I will try to find solutions solution for this here >> http://tinymce.moxiecode.com/js/tinymce/docs/api/index.html#class_tinymce.Editor.html. And in the meantime, any suggestion is welcome.
I have solution:
var editor = tinyMCE.get(id);
editor.setContent( "some text");
<rich:editor id="editor" theme="advanced"
<f:param name="theme_advanced_buttons1" value="" />
<f:param name="theme_advanced_toolbar_location" value="" />
<a4j:commandButton value="Insert text" onclick="insertText('form:editorTextArea');" ></a4j:commandButton>
This works fine, but I now have new problem - How to scroll editor to bottom after inserting text?
Thanks for replay.