亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fckeditor.java

?? 類似word插件來實現對相應的字符串,或者是文章進行處理.同時采用不同的框架來實現..集成JSP等的框架
?? JAVA
字號:
/* * FCKeditor - The text editor for internet
 * Copyright (C) 2003-2005 Frederico Caldeira Knabben
 * 
 * Licensed under the terms of the GNU Lesser General Public License:
 * 		http://www.opensource.org/licenses/lgpl-license.php
 * 
 * For further information visit:
 * 		http://www.fckeditor.net/
 * 
 * File Name: FCKeditor.java
 * 	FCKeditor control class.
 * 
 * Version:  2.3
 * Modified: 2005-08-11 16:29:00
 * 
 * File Authors:
 * 		Simone Chiaretta (simo@users.sourceforge.net) */
 
 
package com.fredck.FCKeditor;

import javax.servlet.http.HttpServletRequest;

/**
 * The main class of the class lib.<br>
 * It's the container for all properties and the class that generate the output based on browser capabilities and configurations passed by the developer.
 *
 * @author Simone Chiaretta (simo@users.sourceforge.net)
 */
public class FCKeditor {
	
	private FCKeditorConfigurations oConfig;
	private String instanceName;
	private String value = "";
	private String basePath;
	private String toolbarSet = "Default";
	private String width = "100%";
	private String height = "200";
	
	HttpServletRequest request;
	
    /**
     * Get the unique name of the editor
     *
     * @return name
     */
	public String getInstanceName() {
		return instanceName;
	}

    /**
     * Set the unique name of the editor
     *
     * @param value name
     */	
	public void setInstanceName(String value) {
		instanceName=value;
	}

    /**
     * Get the initial value to be edited.<br>
     * In HTML code
     *
     * @return value
     */	
	public String getValue() {
		return value;
	}
	
    /**
     * Set the initial value to be edited.<br>
     * In HTML code
     *
     * @param value value
     */		
	public void setValue(String value) {
		this.value=value;
	}

    /**
     * Get the dir where the FCKeditor files reside on the server
     *
     * @return path
     */		
	public String getBasePath() {
		return basePath;
	}
	
    /**
     * Set the dir where the FCKeditor files reside on the server.<br>
	 *<b>Remarks</b>:<br>
	 *Avoid using relative paths. It is preferable to set the base path starting from the root (/).<br>
	 *Always finish the path with a slash (/).
	 *
     * @param value path
     */		
	public void setBasePath(String value) {
		basePath=value;
	}

    /**
     * Get the name of the toolbar to display
     *
     * @return toolbar name
     */	
	public String getToolbarSet() {
		return toolbarSet;
	}

    /**
     * Set the name of the toolbar to display
     *
     * @param value toolbar name
     */		
	public void setToolbarSet(String value) {
		toolbarSet=value;
	}

    /**
     * Get the width of the textarea
     *
     * @return width
     */	
	public String getWidth() {
		return width;
	}

    /**
     * Set the width of the textarea
     *
     * @param value width
     */		
	public void setWidth(String value) {
		width=value;
	}

    /**
     * Get the height of the textarea
     *
     * @return height
     */	
	public String getHeight() {
		return height;
	}

    /**
     * Set the height of the textarea
     *
     * @param value height
     */		
	public void setHeight(String value) {
		height=value;
	}


    /**
     * Get the advanced configuation set.<br>
     * Adding element to this collection you can override the settings specified in the config.js file.
     *
     * @return configuration collection
     */		
	public FCKeditorConfigurations getConfig() {
		return oConfig;
	}

    /**
     * Set the advanced configuation set.
     *
     * @param value configuration collection
     */		
	public void setConfig(FCKeditorConfigurations value) {
		oConfig=value;
	}

    /**
     * Initialize the object setting all value to the default ones.
     * <p>
     * <ul>
     * <li>width: 100%</li>
     * <li>height: 200</li>
     * <li>toolbar name: Default</li>
     * <li>basePath: context root + "/FCKeditor/"</li>
     * </ul>
     * </p>
     *
     * @param req request object
     */	
	public FCKeditor(HttpServletRequest req){
		request=req;
		basePath = request.getContextPath() + "/FCKeditor/";
		oConfig = new FCKeditorConfigurations() ;
	}

    /**
     * Initialize the object setting the unique name and then all value to the default ones.
     * <p>
     * <ul>
     * <li>width: 100%</li>
     * <li>height: 200</li>
     * <li>toolbar name: Default</li>
     * <li>basePath: context root + "/FCKeditor/"</li>
     * </ul>
     * </p>
     *
     * @param req request object
     * @param parInstanceName unique name
     */		
	public FCKeditor(HttpServletRequest req, String parInstanceName){
		request=req;
		basePath = request.getContextPath() + "/FCKeditor/";
		instanceName=parInstanceName;
		oConfig = new FCKeditorConfigurations() ;
	}

    /**
     * Initialize the object setting all basic configurations.<br>
     *
     * The basePath is context root + "/FCKeditor/"
     *
     * @param req request object
     * @param parInstanceName unique name
     * @param parWidth width
     * @param parHeight height
     * @param parToolbarSet toolbarSet name
     * @param parValue initial value
     */		
	public FCKeditor(HttpServletRequest req, String parInstanceName, String parWidth, String parHeight, String parToolbarSet, String parValue){
		request=req;
		basePath = request.getContextPath() + "/FCKeditor/";
		instanceName=parInstanceName;
		width=parWidth;
		height=parHeight;
		toolbarSet=parToolbarSet;
		value=parValue;
		oConfig = new FCKeditorConfigurations() ;
	}
	
	
	private boolean isCompatible() {
		String userAgent=request.getHeader("user-agent");
		if(userAgent==null)
			return false;
		userAgent=userAgent.toLowerCase();
		if ((userAgent.indexOf("msie") !=-1) && (userAgent.indexOf("mac") == -1) && (userAgent.indexOf("opera") == -1)) {
			if(retrieveBrowserVersion(userAgent)>=5.5)
				return true;
		}
		else if (userAgent.indexOf("gecko") !=-1){
			if(retrieveBrowserVersion(userAgent)>=20030210)
				return true;
		}
		return false;
	}
	
	private double retrieveBrowserVersion(String userAgent) {
		if(userAgent.indexOf("msie")>-1) {
			String str = userAgent.substring(userAgent.indexOf("msie") + 5);
			return Double.parseDouble(str.substring(0, str.indexOf(";")));
		}
		else {
			String str = userAgent.substring(userAgent.indexOf("gecko") + 6);
			return Double.parseDouble(str.substring(0, 8));
		}
	}
	
	private String HTMLEncode(String txt) {
		txt=txt.replaceAll("&","&amp;");
		txt=txt.replaceAll("<","&lt;");
		txt=txt.replaceAll(">","&gt;");
		txt=txt.replaceAll("\"","&quot;");
		txt=txt.replaceAll("'","&#146;");
		return txt;
	}
	

    /**
     * Generate the HTML Code for the editor.
     * <br>
     * Evalute the browser capabilities and generate the editor if IE 5.5 or Gecko 20030210 or greater,
     * or a simple textarea otherwise. 
     *
     * @return html code
     */	
	public String create() {
		StringBuffer strEditor=new StringBuffer();
		
		strEditor.append("<div>");
		String encodedValue=HTMLEncode(value);
		
		if(isCompatible()) {
		
			strEditor.append("<input type=\"hidden\" id=\"" + instanceName + "\" name=\"" + instanceName + "\" value=\"" + encodedValue + "\">");
		
			strEditor.append(createConfigHTML());
			strEditor.append(createIFrameHTML());
		
		}
		else{
			strEditor.append("<TEXTAREA name=\"" + instanceName + "\" rows=\"4\" cols=\"40\" style=\"WIDTH: " + width + "; HEIGHT: " + height + "\" wrap=\"virtual\">"+encodedValue+"</TEXTAREA>");
		}
		strEditor.append("</div>");
		return strEditor.toString();
	}
	
	private String createConfigHTML() {
		String configStr=oConfig.getUrlParams();
		
		
		if(!configStr.equals(""))
			configStr=configStr.substring(1);			
			
		return "<input type=\"hidden\" id=\"" + instanceName + "___Config\" value=\"" + configStr + "\">" ;
	}

	private String createIFrameHTML() {
	
		String sLink=basePath + "editor/fckeditor.html?InstanceName=" + instanceName;
		
		if (!toolbarSet.equals(""))
			sLink+="&Toolbar=" + toolbarSet;
		
		 return "<iframe id=\"" + instanceName + "___Frame\" src=\"" + sLink + "\" width=\"" + width + "\" height=\"" + height + "\" frameborder=\"no\" scrolling=\"no\"></iframe>";
		
	}
	
	
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线91免费看| 久久97超碰色| 豆国产96在线|亚洲| 欧美在线一二三四区| 日本一区二区综合亚洲| 免费观看91视频大全| 欧美在线免费观看亚洲| 国产午夜精品福利| 老汉av免费一区二区三区| 日本韩国欧美国产| 自拍偷拍欧美精品| 波波电影院一区二区三区| 久久久美女毛片| 麻豆精品视频在线观看| 欧美三级电影在线看| 亚洲欧美成aⅴ人在线观看| 高清免费成人av| 日本一区二区免费在线观看视频 | 成人性生交大片免费看中文网站| 7777精品伊人久久久大香线蕉最新版| 亚洲欧美精品午睡沙发| 懂色av一区二区三区蜜臀| 日本一区二区三区在线不卡| 国产激情视频一区二区三区欧美| 精品国产制服丝袜高跟| 精品午夜一区二区三区在线观看| 精品日韩在线一区| 高清视频一区二区| 亚洲男人都懂的| 欧美色国产精品| 国产欧美日韩视频在线观看| 亚洲综合丝袜美腿| 欧美二区在线观看| 老司机午夜精品99久久| 国产无遮挡一区二区三区毛片日本| 成人一区二区三区| 一区二区三区精品| 欧美精品久久天天躁| 日韩激情视频在线观看| 国产亚洲污的网站| 91国产成人在线| 另类调教123区| 中文字幕五月欧美| 9191国产精品| 丰满亚洲少妇av| 日韩黄色一级片| 欧美韩日一区二区三区四区| 在线亚洲高清视频| 国产一区二区三区| 午夜一区二区三区在线观看| 精品国产青草久久久久福利| 波多野洁衣一区| 免费在线成人网| 亚洲蜜臀av乱码久久精品| 日韩欧美一级片| 色噜噜狠狠成人网p站| 国产iv一区二区三区| 五月天中文字幕一区二区| 亚洲国产成人在线| 制服丝袜激情欧洲亚洲| 91农村精品一区二区在线| 国产在线不卡视频| 日韩高清在线一区| 一区二区三区四区在线免费观看| 久久男人中文字幕资源站| 欧美人体做爰大胆视频| 91女厕偷拍女厕偷拍高清| 国产乱国产乱300精品| 蜜臀av一区二区在线免费观看| 亚洲乱码国产乱码精品精小说| 久久女同互慰一区二区三区| 欧美日韩卡一卡二| 欧美日韩成人在线一区| 欧美日韩国产免费| 欧美色图天堂网| 欧美图片一区二区三区| 91成人在线精品| 色视频成人在线观看免| 色菇凉天天综合网| 欧美视频精品在线观看| 欧美日韩中文字幕精品| 欧美在线一区二区三区| 欧美精品18+| 欧美男男青年gay1069videost| 欧美另类videos死尸| 欧美精品色综合| 3751色影院一区二区三区| 3d动漫精品啪啪1区2区免费 | 国产一区二区视频在线播放| 久久成人免费电影| 成人高清伦理免费影院在线观看| 国产91丝袜在线播放0| 97精品国产97久久久久久久久久久久| k8久久久一区二区三区 | 国产在线不卡一区| 亚洲第一主播视频| 精品福利在线导航| 精品sm捆绑视频| 中文字幕欧美区| 亚洲成人av一区二区| 国产综合色在线视频区| 成人国产电影网| 欧美日韩视频第一区| 91精品啪在线观看国产60岁| 久久久久久久一区| 有码一区二区三区| 韩国av一区二区三区在线观看 | 欧美日本一道本在线视频| 精品欧美乱码久久久久久1区2区| 日本一区二区免费在线| 日本不卡在线视频| 99久久99久久免费精品蜜臀| 日韩一区二区麻豆国产| 亚洲蜜臀av乱码久久精品 | 午夜视频一区二区| 成人禁用看黄a在线| 欧美一区日韩一区| 亚洲精品国产视频| 成人听书哪个软件好| 欧美成人在线直播| 亚洲成a人片在线观看中文| 成人网页在线观看| 国产亚洲综合av| 国产一区二区在线电影| 精品国产乱码久久久久久夜甘婷婷| 最新中文字幕一区二区三区| 美美哒免费高清在线观看视频一区二区| 成人免费看片app下载| 精品精品国产高清a毛片牛牛| 日韩精品免费视频人成| 欧美午夜精品理论片a级按摩| 亚洲男人的天堂在线aⅴ视频| 国内精品第一页| 久久亚洲私人国产精品va媚药| 五月天亚洲精品| 欧美性xxxxxxxx| 亚洲国产wwwccc36天堂| 91国偷自产一区二区三区观看 | 亚洲自拍另类综合| 91片在线免费观看| 亚洲视频在线一区| av动漫一区二区| 一区二区三区毛片| 欧美精品xxxxbbbb| 国产一区二区三区美女| 国产农村妇女精品| 色久综合一二码| 日本欧美韩国一区三区| 337p粉嫩大胆色噜噜噜噜亚洲| 国产精品99久久久久| 欧美国产日韩在线观看| 99精品欧美一区二区三区小说| 亚洲精品高清视频在线观看| 欧美视频一区在线| 久久99精品久久久久久国产越南 | 一区二区三区成人| 日韩一二三区视频| 黄色小说综合网站| 亚洲蜜臀av乱码久久精品| 91.xcao| 成人涩涩免费视频| 亚洲444eee在线观看| 国产亚洲一区二区三区四区| 成人美女视频在线观看| 日日摸夜夜添夜夜添精品视频| 日韩三级电影网址| 91国产免费看| 国产成人99久久亚洲综合精品| 久久国产婷婷国产香蕉| 国产精品女同一区二区三区| 国产91精品一区二区麻豆亚洲| 国产精品成人免费在线| 制服.丝袜.亚洲.另类.中文| 成人黄色一级视频| 美女国产一区二区| 午夜精品123| 亚洲欧美成aⅴ人在线观看| 久久久久久久国产精品影院| 欧美日韩一区二区三区四区 | 2020国产精品自拍| 91福利精品第一导航| 北岛玲一区二区三区四区| 日本午夜精品一区二区三区电影| 国产精品萝li| 欧美国产精品劲爆| 亚洲精品一区二区三区福利| 欧美日韩国产高清一区二区三区| 一本色道久久综合狠狠躁的推荐| 国内精品久久久久影院色| 天天操天天色综合| 一区二区高清在线| 亚洲最大的成人av| 亚洲色图制服诱惑| 亚洲精品视频一区| 伊人性伊人情综合网| 亚洲永久免费av| 中文字幕精品一区二区三区精品| 欧美va亚洲va在线观看蝴蝶网| 91精品国产综合久久精品图片| 色8久久精品久久久久久蜜 |