我用jeditable:http://www.appelsiini.net/projects/jeditable 與CKEditor的http://ckeditor.com/如何使用ckeditor和jeditable進行配置?
但是我有一個問題,我無法添加customConfig。
我的代碼:
var config = {
toolbar: [
['Source'],['ShowBlocks'],
['PasteText'],
['Image','HorizontalRule','SpecialChar'],
'/',
['Bold','Italic','Underline','Strike','-','Superscript','Format'],
['NumberedList','BulletedList','-','Outdent','Indent','Blockquote'],
['JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock'],
['Link','Unlink']
],
toolbarStartupExpanded: true,
toolbarCanCollapse: false,
toolbarLocation: 'top',
startupShowBorders: false,
forcePasteAsPlainText: true,
skin: 'office2003',
filebrowserBrowseUrl : 'mylinkbrowse',
filebrowserUploadUrl : 'mylinkupload',
resize_enabled: 'true',
resize_dir: 'vertical',
height: '300px',
width: '100%',
uiColor: '#123456',
language: 'en'
}
$('.editreply').click(function(){
var editor = $(this).parent().find('.replyeditor');
editor.editable('mylink',{
type:'ckeditor',
cancel:'Cancel',
submit: 'OK',
rows:3,
onblur: 'ignore'
}); // END OF EDITABLE
CKEDITOR.replace(editor.find("textarea"),{customConfig:config});
editor.click();
//alert(editor.attr('id'));
}); // ENF editreply CLICK
目的是點擊編輯按鈕來呈現的CKEditor。我添加editor.click()來模擬點擊。
如何將配置傳遞給ckeditor?
非常感謝