Wicket开发框架下加入Ckeditor文字编辑插件。
html页面:
<form wicket:id="NoteBookForm">
<textarea wicket:id="content" id="noteBook" name="content">
</textarea>
</form>
<script>
var notebook = CKEDITOR.replace( 'noteBook', {skin : 'kama',language : 'zh-cn',removePlugins:'elementspath', //去掉底部一行的元素路径显示
resize_enabled:false //拖拽功能开关
});
</script>
Wicke Java文件:
Form form = new Form("NoteBookForm",newCompoundPropertyModel(notebook));
this.add(form);
TextArea content = new TextArea("content");
form.add(content);
form.setMultiPart(true);
form.setMaxSize(Bytes.kilobytes(10000));
String con = notebook.getContent();