实在是很摸不着头脑,目的是想调用出编辑器的“图片上传对话框”,如何才可以实现?官网的介绍是http://docs.ckeditor.com/#!/guide/dev_dialog_add_file_browser-section-...,提示使用PleaserefertotheDialogdefinitionAPIforgeneralhelponhowtocreateadialogbox.,没有看懂,疑问:1)默认的编辑器中已经有图片上传功能了,新增这个dialog,那岂不是有2个?2)这个CKEDITOR.dialog.add如何才可以使用按照官网的一个例子,可根本就没有任何变化 CKEDITOR.replace('addform-content',{"height":300,"toolbarGroups":[{"name":"clipboard","groups":["mode","undo","selection","clipboard","doctools"]},{"name":"editing","groups":["tools","about"]},"/",{"name":"paragraph","groups":["templates","list","indent","align"]},{"name":"insert"},"/",{"name":"basicstyles","groups":["basicstyles","cleanup"]},{"name":"colors"},{"name":"links"},{"name":"others"}],"removeButtons":"Smiley,Iframe"});CKEDITOR.config.filebrowserImageBrowseLinkUrl='/upfile/browse';CKEDITOR.config.filebrowserImageBrowseUrl='/upfile/browse?type=Images';CKEDITOR.config.filebrowserImageUploadUrl='/upfile/upload?type=Images';CKEDITOR.dialog.add('testOnly',function(editor){return{title:'TestDialog',resizable:CKEDITOR.DIALOG_RESIZE_BOTH,minWidth:500,minHeight:400,contents:[{id:'tab1',label:'FirstTab',title:'FirstTabTitle',accessKey:'Q',elements:[{type:'text',label:'TestText1',id:'testText1','default':'helloworld!'}]}]};});CKEDITOR.dialog.add('testOnly',function(){}),可编辑器没有任何变化。我不是这个意思,我要实现的是在页面的一个地方加一个按钮“上传图片”,用户一点击,就会自动调用CKEditor的那个上传图片的方法,弹出上传图片的框。
慕尼黑5688855
人到中年有点甜
相关分类