AspCms 升級百度編輯器

來源:互聯網
上載者:User

標籤:style   blog   http   color   java   io   for   檔案   ar   

     1.下載百度編輯器

   網址:http://ueditor.baidu.com/website/download.html

  2.上傳百度編輯器到admin下

  3.修改調用編輯器的檔案

   _content/_Content/AspCms_ContentAdd.asp
   _content/_Content/AspCms_ContentEdit.asp
   _content/_About/AspCms_AboutEdit.asp
   _content/_Sort/AspCms_SortEdit.asp
   _content/_Sort/AspCms_Sortadd.asp

  4.依次引用ueditor.all.min.js    ueditor.config.js   euditor/themes/default/css/ueditor.css

        <script src="../../ueditor/ueditor.all.min.js" type="text/javascript"></script>

        <script  src="../../ueditor/ueditor.config.js" type="text/javascript"></script>

        <link rel="stylesheet" type="text/css" href="../../ueditor/themes/default/css/ueditor.css" />

     5.替換調用編輯器的代碼

 1 <%Dim oFCKeditor:Set oFCKeditor = New FCKeditor
    :oFCKeditor.BasePath
="../../editor/"
    
:oFCKeditor.ToolbarSet="AdminMode"
    
:oFCKeditor.Width="615"
    
:oFCKeditor.Height="300"
    
:oFCKeditor.Value=decodeHtml(Content)
    :oFCKeditor.Create
"Content" 2 3 ‘Default,AdminMode,Simple,UserMode,Basic 4 %> 5 <script type="text/javascript"> 6 function SetEditorPage(EditorName, ContentStr) { 7 var oEditor = FCKeditorAPI.GetInstance(EditorName) ; 8 oEditor.Focus(); 9 //setTimeout(function() { oEditor.Focus(); }, 100);10 oEditor.InsertHtml(ContentStr); 11 }12 </script>

    更換為

1 <textarea name="Content" id="myEditor" style="width:780px;"><%=content%></textarea>2 <script type="text/javascript">3     UE.getEditor(‘myEditor‘)4 </script>

    6.修改Uploader.Class.asp

  行 203-215

 1 Private Function CheckOrCreatePath( ByVal path ) 2      3     Set fs = Server.CreateObject("Scripting.FileSystemObject") 4     Dim parts 5     parts = Split( path, "/" ) 6     path = "" 7     For Each part in parts 8         path = path + part + "/" 9         If fs.FolderExists( path ) = False Then10             fs.CreateFolder( path )11         End If12     Next13 End Function

  修改為:

 1 Public Function CreateDir(ByVal crDirname)  2   Dim M_fso  3   CreateDir=False  4   Set M_fso = CreateObject("Scripting.FileSystemObject")  5   If (M_fso.FolderExists(crDirname)) Then  6    CreateDir=False  7   Else  8    M_fso.CreateFolder(crDirname)  9    CreateDir=True 10   End If 11   Set M_fso = Nothing 12  End Function 13  14  Function CheckOrCreatePath(byval LocalPath) ‘建立目錄的程式,如果有多級目錄,則一級一級的建立 15   on error resume next 16   LocalPath = replace(LocalPath,"\","/") 17   set FileObject = server.createobject("Scripting.FileSystemObject") 18   patharr = split(LocalPath,"/") 19   path_level = ubound(patharr) 20   for i = 0 to path_level 21   if i=0 then pathtmp=patharr(0) & "/" else pathtmp = pathtmp & patharr(i) & "/" 22   cpath = left(pathtmp,len(pathtmp)-1) 23   if not FileObject.FolderExists(cpath) then FileObject.CreateFolder cpath 24   next 25   set FileObject = nothing 26   if err.number<>0 then 27   CreateDIR = false 28   err.Clear 29   else 30   CreateDIR = true 31   end if 32  End Function33 34 End Class

  7.修改config.json

AspCms 升級百度編輯器

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.