• FCKeditor文字编辑器


    FCKeditor文字编辑器的js调用
    1.需要fckeditor包 下载地址 http://dl.pconline.com.cn/html_2/1/776/id=48351&pn=0.html

    <table>	
            <tr>
    		<th align="right">内容:</th>
    		<td colspan="2">
    			<SCRIPT type="text/javascript">
    				var txt = new FCKeditor("txt");
    				txt.BasePath = "<%=webapp%>/resource/fckeditor/";
    				txt.Config["CustomConfigurationsPath"]="<%=webapp%>/resource/fckeditor/myconfig.js";
    				
    				txt.Config["LinkBrowser"] = false ;
    				txt.Config["ImageBrowser"] = false ;
    				txt.Config["FlashBrowser"] = false ;
    				txt.Config["MediaBrowser"] = false ;
    				
    				txt.Config["LinkBrowserURL"] = "<%=webapp%>/resource/fckeditor/editor/filemanager/browser/default/browser.html?Connector=<%=webapp%>/servlet/upload.do" ;
    				txt.Config["ImageBrowserURL"] = "<%=webapp%>/resource/fckeditor/editor/filemanager/browser/default/browser.html?Type=Image&Connector=<%=webapp%>/servlet/upload.do" ;
    				txt.Config["FlashBrowserURL"] = "<%=webapp%>/resource/fckeditor/editor/filemanager/browser/default/browser.html?Type=Flash&Connector=<%=webapp%>/servlet/upload.do" ;
    				txt.Config["MediaBrowserURL"] = "<%=webapp%>/resource/fckeditor/editor/filemanager/browser/default/browser.html?Type=Media&Connector=<%=webapp%>/servlet/upload.do" ;
    				
    				txt.Config["LinkUpload"] = true ;
    				txt.Config["ImageUpload"] = true ;
    				txt.Config["FlashUpload"] = true ;
    				txt.Config["MediaUpload"] = true ;
    				
    				txt.Config["LinkUploadURL"] = "<%=webapp%>/servlet/upload.do" ;
    				txt.Config["ImageUploadURL"] = "<%=webapp%>/servlet/upload.do?Type=Image" ;
    				txt.Config["FlashUploadURL"] = "<%=webapp%>/servlet/upload.do?Type=Flash" ;
    				txt.Config["MediaUploadURL"] = "<%=webapp%>/servlet/upload.do?Type=Media" ;
    				
    				txt.ToolbarSet="My";
    				txt.Height=310;
    				txt.Value="";
    				txt.Create();
     
    			</SCRIPT>
    		</td>
    
    	</tr>
    </table>   
    

      2.信息保存注意

    String str=request.getParameter("txt");
    str=str.replaceAll("((\r?\n)+|\t*)", "");
    

      

  • 相关阅读:
    ThinkPHP---框架介绍
    (独孤九剑)--cURL
    浅谈Session与Cookie的区别与联系
    (独孤九剑)--会话管理和控制
    PHP数据乱码
    (独孤九剑)---PHP操作MySQL数据库
    错误宝典
    变量、常量、注释、PEP8开发规范、数据类型、Python2和Python3的区别、用户输入、流程控制语句
    什么是编程语言
    CSS
  • 原文地址:https://www.cnblogs.com/libaoting/p/FCKeditorli.html
Copyright © 2020-2023  润新知