-
1. Re: Richface Editor, how to set text with javascript?
ilya_shaikovsky Jan 25, 2010 4:03 AM (in response to nnikolic1987)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. -
2. Re: Richface Editor, how to set text with javascript?
nnikolic1987 Jan 25, 2010 11:34 AM (in response to ilya_shaikovsky)Hello,
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.
Thanks again.
-
3. Re: Richface Editor, how to set text with javascript?
nnikolic1987 Jan 26, 2010 1:11 PM (in response to nnikolic1987)Hi again,
I have solution:
<script type="text/javascript">
function insertText(id){
var editor = tinyMCE.get(id);
editor.setContent( "some text");
}
</script><a4j:form id="form">
<rich:editor id="editor" theme="advanced"
height="350" width="700">
<f:param name="theme_advanced_buttons1" value="" />
<f:param name="theme_advanced_toolbar_location" value="" /></rich:editor>
<a4j:commandButton value="Insert text" onclick="insertText('form:editorTextArea');" ></a4j:commandButton></a4j:form>
This works fine, but I now have new problem - How to scroll editor to bottom after inserting text?
Thanks for replay.