public class CKEditorSubmitModifier extends AttributeModifier {
public CKEditorSubmitModifier() {
super("onclick", new AbstractReadOnlyModel<String>() {
@Override
public String getObject() {
return "$('.ckeditor').each(function() { var aval = $
(this).val(); $(this).text(aval);});";//ofcourse the ckeditor class
must be specified for the textarea
}
});
}
@Override
protected String newValue(String currentValue, String
replacementValue) {
// Call the trigger, before submitting the form
String result = replacementValue;
if (currentValue != null) {
result = result + currentValue;
}
return result;
}
}
Maybe there is something I'm doing wrong or you can include a better
SubmitModifier with the library.
Thanks.