實(shí)在是很摸不著頭腦,目的是想調(diào)用出編輯器的“圖片上傳對(duì)話框”,如何才可以實(shí)現(xiàn)?官網(wǎng)的介紹是http://docs.ckeditor.com/#!/guide/dev_dialog_add_file_browser-section-...,提示使用PleaserefertotheDialogdefinitionAPIforgeneralhelponhowtocreateadialogbox.,沒有看懂,疑問:1)默認(rèn)的編輯器中已經(jīng)有圖片上傳功能了,新增這個(gè)dialog,那豈不是有2個(gè)?2)這個(gè)CKEDITOR.dialog.add如何才可以使用按照官網(wǎng)的一個(gè)例子,可根本就沒有任何變化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(){}),可編輯器沒有任何變化。我不是這個(gè)意思,我要實(shí)現(xiàn)的是在頁面的一個(gè)地方加一個(gè)按鈕“上傳圖片”,用戶一點(diǎn)擊,就會(huì)自動(dòng)調(diào)用CKEditor的那個(gè)上傳圖片的方法,彈出上傳圖片的框。
求助,CKEditor 如何使用?
拉風(fēng)的咖菲貓
2019-04-13 08:36:46