解决方法
首先你应该在页面中包含ckeditor和jquery连接器脚本,
然后创建一个textarea
<textarea name="content" class="editor" id="ms_editor"></textarea>
附加ckeditor到文本区域,在我的项目中我使用这样的东西:
$('textarea.editor').ckeditor(function() { },{ toolbar : [ ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print','SpellChecker','Scayt'],['Undo','Redo'],['Bold','Italic','Underline','Strike','Subscript','Superscript'],['NumberedList','BulletedList','Outdent','Indent','Blockquote'],['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],['Link','Unlink','Anchor','Image','Smiley'],['Table','HorizontalRule','SpecialChar'],['Styles','BGColor'] ],toolbarCanCollapse:false,height: '300px',scayt_sLang: 'pt_PT',uiColor : '#EBEBEB' } );
var content = $( 'textarea.editor' ).val();
而已!