I am trying to use CKEditor in my JSF application. How to get CKEditor contents in support of bean ..?
index.xhtml
<form action="" method="post"> <p> My Editor:<br /> <textarea cols="90" rows="20" id="editor1" name="editor1" value="#{EditorBean.value}"></textarea> <script type="text/javascript"> CKEDITOR.replace( 'editor1', { uiColor: '#85B5D9' }); </script> <input type="button" value="Clear" name="clear" onclick="clear1()"/> </p> </form>
Backingbean
@ManagedBean public class EditorBean {
private String value; public String getValue() { return value; } public void setValue(String value) { this.value = value; System.out.println("Content: "+value); }
}
When I tried to print the value, it does not print. Help me in this matter. The PrimeFaces editor does not support the Insert Table feature. So, I want to use CKE.
source share