Commit 06a7dd42 authored by 刘文胜's avatar 刘文胜

删除ueditor

parent 04429643
package com.baidu.ueditor;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.baidu.ueditor.define.ActionMap;
import com.baidu.ueditor.define.AppInfo;
import com.baidu.ueditor.define.BaseState;
import com.baidu.ueditor.define.State;
import com.baidu.ueditor.hunter.FileManager;
import com.baidu.ueditor.hunter.ImageHunter;
import com.baidu.ueditor.upload.Uploader;
public class ActionEnter {
private HttpServletRequest request = null;
private String rootPath = null;
private String contextPath = null;
private String actionType = null;
private ConfigManager configManager = null;
public ActionEnter ( HttpServletRequest request, String rootPath ) {
this.request = request;
this.rootPath = rootPath;
this.actionType = request.getParameter( "action" );
this.contextPath = request.getContextPath();
this.configManager = ConfigManager.getInstance( this.rootPath, this.contextPath, request.getRequestURI() );
}
public String exec () {
String callbackName = this.request.getParameter("callback");
if ( callbackName != null ) {
if ( !validCallbackName( callbackName ) ) {
return new BaseState( false, AppInfo.ILLEGAL ).toJSONString();
}
return callbackName+"("+this.invoke()+");";
} else {
return this.invoke();
}
}
public String invoke() {
if ( actionType == null || !ActionMap.mapping.containsKey( actionType ) ) {
return new BaseState( false, AppInfo.INVALID_ACTION ).toJSONString();
}
if ( this.configManager == null || !this.configManager.valid() ) {
return new BaseState( false, AppInfo.CONFIG_ERROR ).toJSONString();
}
State state = null;
int actionCode = ActionMap.getType( this.actionType );
Map<String, Object> conf = null;
switch ( actionCode ) {
case ActionMap.CONFIG:
return this.configManager.getAllConfig().toString();
case ActionMap.UPLOAD_IMAGE:
case ActionMap.UPLOAD_SCRAWL:
case ActionMap.UPLOAD_VIDEO:
case ActionMap.UPLOAD_FILE:
conf = this.configManager.getConfig( actionCode );
state = new Uploader( request, conf ).doExec();
break;
case ActionMap.CATCH_IMAGE:
conf = configManager.getConfig( actionCode );
String[] list = this.request.getParameterValues( (String)conf.get( "fieldName" ) );
state = new ImageHunter( conf ).capture( list );
break;
case ActionMap.LIST_IMAGE:
case ActionMap.LIST_FILE:
conf = configManager.getConfig( actionCode );
int start = this.getStartIndex();
state = new FileManager( conf ).listFile( start );
break;
}
return state.toJSONString();
}
public int getStartIndex () {
String start = this.request.getParameter( "start" );
try {
return Integer.parseInt( start );
} catch ( Exception e ) {
return 0;
}
}
/**
* callback参数验证
*/
public boolean validCallbackName ( String name ) {
if ( name.matches( "^[a-zA-Z_]+[\\w0-9_]*$" ) ) {
return true;
}
return false;
}
}
\ No newline at end of file
package com.baidu.ueditor;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Map;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baidu.ueditor.define.ActionMap;
/**
* 配置管理器
* @author hancong03@baidu.com
*
*/
public final class ConfigManager {
private final String rootPath;
private final String originalPath;
private final String contextPath;
private static final String configFileName = "config.json";
private String parentPath = null;
private JSONObject jsonConfig = null;
// 涂鸦上传filename定义
private final static String SCRAWL_FILE_NAME = "scrawl";
// 远程图片抓取filename定义
private final static String REMOTE_FILE_NAME = "remote";
/*
* 通过一个给定的路径构建一个配置管理器, 该管理器要求地址路径所在目录下必须存在config.properties文件
*/
private ConfigManager ( String rootPath, String contextPath, String uri ) throws FileNotFoundException, IOException {
rootPath = rootPath.replace( "\\", "/" );
this.rootPath = rootPath;
this.contextPath = contextPath;
if ( contextPath.length() > 0 ) {
this.originalPath = this.rootPath + uri.substring( contextPath.length() );
} else {
this.originalPath = this.rootPath + uri;
}
this.initEnv();
}
/**
* 配置管理器构造工厂
* @param rootPath 服务器根路径
* @param contextPath 服务器所在项目路径
* @param uri 当前访问的uri
* @return 配置管理器实例或者null
*/
public static ConfigManager getInstance ( String rootPath, String contextPath, String uri ) {
try {
return new ConfigManager(rootPath, contextPath, uri);
} catch ( Exception e ) {
return null;
}
}
// 验证配置文件加载是否正确
public boolean valid () {
return this.jsonConfig != null;
}
public JSONObject getAllConfig () {
return this.jsonConfig;
}
public Map<String, Object> getConfig ( int type ) {
Map<String, Object> conf = new HashMap<String, Object>();
String savePath = null;
switch ( type ) {
case ActionMap.UPLOAD_FILE:
conf.put( "isBase64", "false" );
conf.put( "maxSize", this.jsonConfig.getLong( "fileMaxSize" ) );
conf.put( "allowFiles", this.getArray( "fileAllowFiles" ) );
conf.put( "fieldName", this.jsonConfig.getString( "fileFieldName" ) );
savePath = this.jsonConfig.getString( "filePathFormat" );
break;
case ActionMap.UPLOAD_IMAGE:
conf.put( "isBase64", "false" );
conf.put( "maxSize", this.jsonConfig.getLong( "imageMaxSize" ) );
conf.put( "allowFiles", this.getArray( "imageAllowFiles" ) );
conf.put( "fieldName", this.jsonConfig.getString( "imageFieldName" ) );
savePath = this.jsonConfig.getString( "imagePathFormat" );
break;
case ActionMap.UPLOAD_VIDEO:
conf.put( "maxSize", this.jsonConfig.getLong( "videoMaxSize" ) );
conf.put( "allowFiles", this.getArray( "videoAllowFiles" ) );
conf.put( "fieldName", this.jsonConfig.getString( "videoFieldName" ) );
savePath = this.jsonConfig.getString( "videoPathFormat" );
break;
case ActionMap.UPLOAD_SCRAWL:
conf.put( "filename", ConfigManager.SCRAWL_FILE_NAME );
conf.put( "maxSize", this.jsonConfig.getLong( "scrawlMaxSize" ) );
conf.put( "fieldName", this.jsonConfig.getString( "scrawlFieldName" ) );
conf.put( "isBase64", "true" );
savePath = this.jsonConfig.getString( "scrawlPathFormat" );
break;
case ActionMap.CATCH_IMAGE:
conf.put( "filename", ConfigManager.REMOTE_FILE_NAME );
conf.put( "filter", this.getArray( "catcherLocalDomain" ) );
conf.put( "maxSize", this.jsonConfig.getLong( "catcherMaxSize" ) );
conf.put( "allowFiles", this.getArray( "catcherAllowFiles" ) );
conf.put( "fieldName", this.jsonConfig.getString( "catcherFieldName" ) + "[]" );
savePath = this.jsonConfig.getString( "catcherPathFormat" );
break;
case ActionMap.LIST_IMAGE:
conf.put( "allowFiles", this.getArray( "imageManagerAllowFiles" ) );
conf.put( "dir", this.jsonConfig.getString( "imageManagerListPath" ) );
conf.put( "count", this.jsonConfig.getIntValue( "imageManagerListSize" ) );
break;
case ActionMap.LIST_FILE:
conf.put( "allowFiles", this.getArray( "fileManagerAllowFiles" ) );
conf.put( "dir", this.jsonConfig.getString( "fileManagerListPath" ) );
conf.put( "count", this.jsonConfig.getIntValue( "fileManagerListSize" ) );
break;
}
conf.put( "savePath", savePath );
conf.put( "rootPath", this.rootPath );
return conf;
}
private void initEnv () throws FileNotFoundException, IOException {
File file = new File( this.originalPath );
if ( !file.isAbsolute() ) {
file = new File( file.getAbsolutePath() );
}
this.parentPath = file.getParent();
String configContent = this.readFile( this.getConfigPath() );
try{
JSONObject jsonConfig = JSONObject.parseObject( configContent );
this.jsonConfig = jsonConfig;
} catch ( Exception e ) {
this.jsonConfig = null;
}
}
private String getConfigPath () {
return /*this.parentPath + File.separator + */ConfigManager.configFileName;
}
private String[] getArray ( String key ) {
JSONArray jsonArray = this.jsonConfig.getJSONArray( key );
String[] result = new String[ jsonArray.size() ];
for ( int i = 0, len = jsonArray.size(); i < len; i++ ) {
result[i] = jsonArray.getString( i );
}
return result;
}
private String readFile ( String path ) throws IOException {
StringBuilder builder = new StringBuilder();
try {
InputStream is=this.getClass().getClassLoader().getResourceAsStream(ConfigManager.configFileName);
InputStreamReader reader = new InputStreamReader( is, "UTF-8" );
BufferedReader bfReader = new BufferedReader( reader );
String tmpContent = null;
while ( ( tmpContent = bfReader.readLine() ) != null ) {
builder.append( tmpContent );
}
bfReader.close();
} catch ( UnsupportedEncodingException e ) {
// 忽略
}
return this.filter( builder.toString() );
}
// 过滤输入字符串, 剔除多行注释以及替换掉反斜杠
private String filter ( String input ) {
return input.replaceAll( "/\\*[\\s\\S]*?\\*/", "" );
}
}
package com.baidu.ueditor;
public class Encoder {
public static String toUnicode ( String input ) {
StringBuilder builder = new StringBuilder();
char[] chars = input.toCharArray();
for ( char ch : chars ) {
if ( ch < 256 ) {
builder.append( ch );
} else {
builder.append( "\\u" + Integer.toHexString( ch& 0xffff ) );
}
}
return builder.toString();
}
}
\ No newline at end of file
package com.baidu.ueditor;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class PathFormat {
private static final String TIME = "time";
private static final String FULL_YEAR = "yyyy";
private static final String YEAR = "yy";
private static final String MONTH = "mm";
private static final String DAY = "dd";
private static final String HOUR = "hh";
private static final String MINUTE = "ii";
private static final String SECOND = "ss";
private static final String RAND = "rand";
private static Date currentDate = null;
public static String parse ( String input ) {
Pattern pattern = Pattern.compile( "\\{([^\\}]+)\\}", Pattern.CASE_INSENSITIVE );
Matcher matcher = pattern.matcher(input);
PathFormat.currentDate = new Date();
StringBuffer sb = new StringBuffer();
while ( matcher.find() ) {
matcher.appendReplacement(sb, PathFormat.getString( matcher.group( 1 ) ) );
}
matcher.appendTail(sb);
return sb.toString();
}
/**
* 格式化路径, 把windows路径替换成标准路径
* @param input 待格式化的路径
* @return 格式化后的路径
*/
public static String format ( String input ) {
return input.replace( "\\", "/" );
}
public static String parse ( String input, String filename ) {
Pattern pattern = Pattern.compile( "\\{([^\\}]+)\\}", Pattern.CASE_INSENSITIVE );
Matcher matcher = pattern.matcher(input);
String matchStr = null;
PathFormat.currentDate = new Date();
StringBuffer sb = new StringBuffer();
while ( matcher.find() ) {
matchStr = matcher.group( 1 );
if ( matchStr.indexOf( "filename" ) != -1 ) {
filename = filename.replace( "$", "\\$" ).replaceAll( "[\\/:*?\"<>|]", "" );
matcher.appendReplacement(sb, filename );
} else {
matcher.appendReplacement(sb, PathFormat.getString( matchStr ) );
}
}
matcher.appendTail(sb);
return sb.toString();
}
private static String getString ( String pattern ) {
pattern = pattern.toLowerCase();
// time 处理
if ( pattern.indexOf( PathFormat.TIME ) != -1 ) {
return PathFormat.getTimestamp();
} else if ( pattern.indexOf( PathFormat.FULL_YEAR ) != -1 ) {
return PathFormat.getFullYear();
} else if ( pattern.indexOf( PathFormat.YEAR ) != -1 ) {
return PathFormat.getYear();
} else if ( pattern.indexOf( PathFormat.MONTH ) != -1 ) {
return PathFormat.getMonth();
} else if ( pattern.indexOf( PathFormat.DAY ) != -1 ) {
return PathFormat.getDay();
} else if ( pattern.indexOf( PathFormat.HOUR ) != -1 ) {
return PathFormat.getHour();
} else if ( pattern.indexOf( PathFormat.MINUTE ) != -1 ) {
return PathFormat.getMinute();
} else if ( pattern.indexOf( PathFormat.SECOND ) != -1 ) {
return PathFormat.getSecond();
} else if ( pattern.indexOf( PathFormat.RAND ) != -1 ) {
return PathFormat.getRandom( pattern );
}
return pattern;
}
private static String getTimestamp () {
return System.currentTimeMillis() + "";
}
private static String getFullYear () {
return new SimpleDateFormat( "yyyy" ).format( PathFormat.currentDate );
}
private static String getYear () {
return new SimpleDateFormat( "yy" ).format( PathFormat.currentDate );
}
private static String getMonth () {
return new SimpleDateFormat( "MM" ).format( PathFormat.currentDate );
}
private static String getDay () {
return new SimpleDateFormat( "dd" ).format( PathFormat.currentDate );
}
private static String getHour () {
return new SimpleDateFormat( "HH" ).format( PathFormat.currentDate );
}
private static String getMinute () {
return new SimpleDateFormat( "mm" ).format( PathFormat.currentDate );
}
private static String getSecond () {
return new SimpleDateFormat( "ss" ).format( PathFormat.currentDate );
}
private static String getRandom ( String pattern ) {
int length = 0;
pattern = pattern.split( ":" )[ 1 ].trim();
length = Integer.parseInt( pattern );
return ( Math.random() + "" ).replace( ".", "" ).substring( 0, length );
}
}
package com.baidu.ueditor.define;
import java.util.Map;
import java.util.HashMap;
/**
* 定义请求action类型
* @author hancong03@baidu.com
*
*/
@SuppressWarnings("serial")
public final class ActionMap {
public static final Map<String, Integer> mapping;
// 获取配置请求
public static final int CONFIG = 0;
public static final int UPLOAD_IMAGE = 1;
public static final int UPLOAD_SCRAWL = 2;
public static final int UPLOAD_VIDEO = 3;
public static final int UPLOAD_FILE = 4;
public static final int CATCH_IMAGE = 5;
public static final int LIST_FILE = 6;
public static final int LIST_IMAGE = 7;
static {
mapping = new HashMap<String, Integer>(){{
put( "config", ActionMap.CONFIG );
put( "uploadimage", ActionMap.UPLOAD_IMAGE );
put( "uploadscrawl", ActionMap.UPLOAD_SCRAWL );
put( "uploadvideo", ActionMap.UPLOAD_VIDEO );
put( "uploadfile", ActionMap.UPLOAD_FILE );
put( "catchimage", ActionMap.CATCH_IMAGE );
put( "listfile", ActionMap.LIST_FILE );
put( "listimage", ActionMap.LIST_IMAGE );
}};
}
public static int getType ( String key ) {
return ActionMap.mapping.get( key );
}
}
package com.baidu.ueditor.define;
public enum ActionState {
UNKNOW_ERROR
}
package com.baidu.ueditor.define;
import java.util.HashMap;
import java.util.Map;
public final class AppInfo {
public static final int SUCCESS = 0;
public static final int MAX_SIZE = 1;
public static final int PERMISSION_DENIED = 2;
public static final int FAILED_CREATE_FILE = 3;
public static final int IO_ERROR = 4;
public static final int NOT_MULTIPART_CONTENT = 5;
public static final int PARSE_REQUEST_ERROR = 6;
public static final int NOTFOUND_UPLOAD_DATA = 7;
public static final int NOT_ALLOW_FILE_TYPE = 8;
public static final int INVALID_ACTION = 101;
public static final int CONFIG_ERROR = 102;
public static final int PREVENT_HOST = 201;
public static final int CONNECTION_ERROR = 202;
public static final int REMOTE_FAIL = 203;
public static final int NOT_DIRECTORY = 301;
public static final int NOT_EXIST = 302;
public static final int ILLEGAL = 401;
public static Map<Integer, String> info = new HashMap<Integer, String>(){{
put( AppInfo.SUCCESS, "SUCCESS" );
// 无效的Action
put( AppInfo.INVALID_ACTION, "\u65E0\u6548\u7684Action" );
// 配置文件初始化失败
put( AppInfo.CONFIG_ERROR, "\u914D\u7F6E\u6587\u4EF6\u521D\u59CB\u5316\u5931\u8D25" );
// 抓取远程图片失败
put( AppInfo.REMOTE_FAIL, "\u6293\u53D6\u8FDC\u7A0B\u56FE\u7247\u5931\u8D25" );
// 被阻止的远程主机
put( AppInfo.PREVENT_HOST, "\u88AB\u963B\u6B62\u7684\u8FDC\u7A0B\u4E3B\u673A" );
// 远程连接出错
put( AppInfo.CONNECTION_ERROR, "\u8FDC\u7A0B\u8FDE\u63A5\u51FA\u9519" );
// "文件大小超出限制"
put( AppInfo.MAX_SIZE, "\u6587\u4ef6\u5927\u5c0f\u8d85\u51fa\u9650\u5236" );
// 权限不足, 多指写权限
put( AppInfo.PERMISSION_DENIED, "\u6743\u9650\u4E0D\u8DB3" );
// 创建文件失败
put( AppInfo.FAILED_CREATE_FILE, "\u521B\u5EFA\u6587\u4EF6\u5931\u8D25" );
// IO错误
put( AppInfo.IO_ERROR, "IO\u9519\u8BEF" );
// 上传表单不是multipart/form-data类型
put( AppInfo.NOT_MULTIPART_CONTENT, "\u4E0A\u4F20\u8868\u5355\u4E0D\u662Fmultipart/form-data\u7C7B\u578B" );
// 解析上传表单错误
put( AppInfo.PARSE_REQUEST_ERROR, "\u89E3\u6790\u4E0A\u4F20\u8868\u5355\u9519\u8BEF" );
// 未找到上传数据
put( AppInfo.NOTFOUND_UPLOAD_DATA, "\u672A\u627E\u5230\u4E0A\u4F20\u6570\u636E" );
// 不允许的文件类型
put( AppInfo.NOT_ALLOW_FILE_TYPE, "\u4E0D\u5141\u8BB8\u7684\u6587\u4EF6\u7C7B\u578B" );
// 指定路径不是目录
put( AppInfo.NOT_DIRECTORY, "\u6307\u5B9A\u8DEF\u5F84\u4E0D\u662F\u76EE\u5F55" );
// 指定路径并不存在
put( AppInfo.NOT_EXIST, "\u6307\u5B9A\u8DEF\u5F84\u5E76\u4E0D\u5B58\u5728" );
// callback参数名不合法
put( AppInfo.ILLEGAL, "Callback\u53C2\u6570\u540D\u4E0D\u5408\u6CD5" );
}};
public static String getStateInfo ( int key ) {
return AppInfo.info.get( key );
}
}
package com.baidu.ueditor.define;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import com.baidu.ueditor.Encoder;
public class BaseState implements State {
private boolean state = false;
private String info = null;
private Map<String, String> infoMap = new HashMap<String, String>();
public BaseState () {
this.state = true;
}
public BaseState ( boolean state ) {
this.setState( state );
}
public BaseState ( boolean state, String info ) {
this.setState( state );
this.info = info;
}
public BaseState ( boolean state, int infoCode ) {
this.setState( state );
this.info = AppInfo.getStateInfo( infoCode );
}
public boolean isSuccess () {
return this.state;
}
public void setState ( boolean state ) {
this.state = state;
}
public void setInfo ( String info ) {
this.info = info;
}
public void setInfo ( int infoCode ) {
this.info = AppInfo.getStateInfo( infoCode );
}
public String toJSONString() {
return this.toString();
}
public String toString () {
String key = null;
String stateVal = this.isSuccess() ? AppInfo.getStateInfo( AppInfo.SUCCESS ) : this.info;
StringBuilder builder = new StringBuilder();
builder.append( "{\"state\": \"" + stateVal + "\"" );
Iterator<String> iterator = this.infoMap.keySet().iterator();
while ( iterator.hasNext() ) {
key = iterator.next();
builder.append( ",\"" + key + "\": \"" + this.infoMap.get(key) + "\"" );
}
builder.append( "}" );
return Encoder.toUnicode( builder.toString() );
}
public void putInfo(String name, String val) {
this.infoMap.put(name, val);
}
public void putInfo(String name, long val) {
this.putInfo(name, val+"");
}
}
package com.baidu.ueditor.define;
import java.util.HashMap;
import java.util.Map;
public class FileType {
public static final String JPG = "JPG";
private static final Map<String, String> types = new HashMap<String, String>(){{
put( FileType.JPG, ".jpg" );
}};
public static String getSuffix ( String key ) {
return FileType.types.get( key );
}
/**
* 根据给定的文件名,获取其后缀信息
* @param filename
* @return
*/
public static String getSuffixByFilename ( String filename ) {
return filename.substring( filename.lastIndexOf( "." ) ).toLowerCase();
}
}
package com.baidu.ueditor.define;
import java.util.HashMap;
import java.util.Map;
public class MIMEType {
public static final Map<String, String> types = new HashMap<String, String>(){{
put( "image/gif", ".gif" );
put( "image/jpeg", ".jpg" );
put( "image/jpg", ".jpg" );
put( "image/png", ".png" );
put( "image/bmp", ".bmp" );
}};
public static String getSuffix ( String mime ) {
return MIMEType.types.get( mime );
}
}
package com.baidu.ueditor.define;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import com.baidu.ueditor.Encoder;
/**
* 多状态集合状态
* 其包含了多个状态的集合, 其本身自己也是一个状态
* @author hancong03@baidu.com
*
*/
public class MultiState implements State {
private boolean state = false;
private String info = null;
private Map<String, Long> intMap = new HashMap<String, Long>();
private Map<String, String> infoMap = new HashMap<String, String>();
private List<String> stateList = new ArrayList<String>();
public MultiState ( boolean state ) {
this.state = state;
}
public MultiState ( boolean state, String info ) {
this.state = state;
this.info = info;
}
public MultiState ( boolean state, int infoKey ) {
this.state = state;
this.info = AppInfo.getStateInfo( infoKey );
}
public boolean isSuccess() {
return this.state;
}
public void addState ( State state ) {
stateList.add( state.toJSONString() );
}
/**
* 该方法调用无效果
*/
public void putInfo(String name, String val) {
this.infoMap.put(name, val);
}
public String toJSONString() {
String stateVal = this.isSuccess() ? AppInfo.getStateInfo( AppInfo.SUCCESS ) : this.info;
StringBuilder builder = new StringBuilder();
builder.append( "{\"state\": \"" + stateVal + "\"" );
// 数字转换
Iterator<String> iterator = this.intMap.keySet().iterator();
while ( iterator.hasNext() ) {
stateVal = iterator.next();
builder.append( ",\""+ stateVal +"\": " + this.intMap.get( stateVal ) );
}
iterator = this.infoMap.keySet().iterator();
while ( iterator.hasNext() ) {
stateVal = iterator.next();
builder.append( ",\""+ stateVal +"\": \"" + this.infoMap.get( stateVal ) + "\"" );
}
builder.append( ", list: [" );
iterator = this.stateList.iterator();
while ( iterator.hasNext() ) {
builder.append( iterator.next() + "," );
}
if ( this.stateList.size() > 0 ) {
builder.deleteCharAt( builder.length() - 1 );
}
builder.append( " ]}" );
return Encoder.toUnicode( builder.toString() );
}
public void putInfo(String name, long val) {
this.intMap.put( name, val );
}
}
package com.baidu.ueditor.define;
/**
* 处理状态接口
* @author hancong03@baidu.com
*
*/
public interface State {
public boolean isSuccess ();
public void putInfo( String name, String val );
public void putInfo ( String name, long val );
public String toJSONString ();
}
package com.baidu.ueditor.hunter;
import java.io.File;
import java.util.Arrays;
import java.util.Collection;
import java.util.Map;
import org.apache.commons.io.FileUtils;
import com.baidu.ueditor.PathFormat;
import com.baidu.ueditor.define.AppInfo;
import com.baidu.ueditor.define.BaseState;
import com.baidu.ueditor.define.MultiState;
import com.baidu.ueditor.define.State;
public class FileManager {
private String dir = null;
private String rootPath = null;
private String[] allowFiles = null;
private int count = 0;
public FileManager ( Map<String, Object> conf ) {
this.rootPath = (String)conf.get( "rootPath" );
this.dir = this.rootPath + (String)conf.get( "dir" );
this.allowFiles = this.getAllowFiles( conf.get("allowFiles") );
this.count = (Integer)conf.get( "count" );
}
public State listFile ( int index ) {
File dir = new File( this.dir );
State state = null;
if ( !dir.exists() ) {
return new BaseState( false, AppInfo.NOT_EXIST );
}
if ( !dir.isDirectory() ) {
return new BaseState( false, AppInfo.NOT_DIRECTORY );
}
Collection<File> list = FileUtils.listFiles( dir, this.allowFiles, true );
if ( index < 0 || index > list.size() ) {
state = new MultiState( true );
} else {
Object[] fileList = Arrays.copyOfRange( list.toArray(), index, index + this.count );
state = this.getState( fileList );
}
state.putInfo( "start", index );
state.putInfo( "total", list.size() );
return state;
}
private State getState ( Object[] files ) {
MultiState state = new MultiState( true );
BaseState fileState = null;
File file = null;
for ( Object obj : files ) {
if ( obj == null ) {
break;
}
file = (File)obj;
fileState = new BaseState( true );
fileState.putInfo( "url", PathFormat.format( this.getPath( file ) ) );
state.addState( fileState );
}
return state;
}
private String getPath ( File file ) {
String path = file.getAbsolutePath();
return path.replace( this.rootPath, "/" );
}
private String[] getAllowFiles ( Object fileExt ) {
String[] exts = null;
String ext = null;
if ( fileExt == null ) {
return new String[ 0 ];
}
exts = (String[])fileExt;
for ( int i = 0, len = exts.length; i < len; i++ ) {
ext = exts[ i ];
exts[ i ] = ext.replace( ".", "" );
}
return exts;
}
}
package com.baidu.ueditor.hunter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import com.baidu.ueditor.PathFormat;
import com.baidu.ueditor.define.AppInfo;
import com.baidu.ueditor.define.BaseState;
import com.baidu.ueditor.define.MIMEType;
import com.baidu.ueditor.define.MultiState;
import com.baidu.ueditor.define.State;
import com.baidu.ueditor.upload.StorageManager;
/**
* 图片抓取器
* @author hancong03@baidu.com
*
*/
public class ImageHunter {
private String filename = null;
private String savePath = null;
private String rootPath = null;
private List<String> allowTypes = null;
private long maxSize = -1;
private List<String> filters = null;
public ImageHunter ( Map<String, Object> conf ) {
this.filename = (String)conf.get( "filename" );
this.savePath = (String)conf.get( "savePath" );
this.rootPath = (String)conf.get( "rootPath" );
this.maxSize = (Long)conf.get( "maxSize" );
this.allowTypes = Arrays.asList( (String[])conf.get( "allowFiles" ) );
this.filters = Arrays.asList( (String[])conf.get( "filter" ) );
}
public State capture ( String[] list ) {
MultiState state = new MultiState( true );
for ( String source : list ) {
state.addState( captureRemoteData( source ) );
}
return state;
}
public State captureRemoteData ( String urlStr ) {
HttpURLConnection connection = null;
URL url = null;
String suffix = null;
try {
url = new URL( urlStr );
if ( !validHost( url.getHost() ) ) {
return new BaseState( false, AppInfo.PREVENT_HOST );
}
connection = (HttpURLConnection) url.openConnection();
connection.setInstanceFollowRedirects( true );
connection.setUseCaches( true );
if ( !validContentState( connection.getResponseCode() ) ) {
return new BaseState( false, AppInfo.CONNECTION_ERROR );
}
suffix = MIMEType.getSuffix( connection.getContentType() );
if ( !validFileType( suffix ) ) {
return new BaseState( false, AppInfo.NOT_ALLOW_FILE_TYPE );
}
if ( !validFileSize( connection.getContentLength() ) ) {
return new BaseState( false, AppInfo.MAX_SIZE );
}
String savePath = this.getPath( this.savePath, this.filename, suffix );
String physicalPath = this.rootPath + savePath;
State state = StorageManager.saveFileByInputStream( connection.getInputStream(), physicalPath );
if ( state.isSuccess() ) {
state.putInfo( "url", PathFormat.format( savePath ) );
state.putInfo( "source", urlStr );
}
return state;
} catch ( Exception e ) {
return new BaseState( false, AppInfo.REMOTE_FAIL );
}
}
private String getPath ( String savePath, String filename, String suffix ) {
return PathFormat.parse( savePath + suffix, filename );
}
private boolean validHost ( String hostname ) {
return !filters.contains( hostname );
}
private boolean validContentState ( int code ) {
return HttpURLConnection.HTTP_OK == code;
}
private boolean validFileType ( String type ) {
return this.allowTypes.contains( type );
}
private boolean validFileSize ( int size ) {
return size < this.maxSize;
}
}
package com.baidu.ueditor.upload;
import com.baidu.ueditor.PathFormat;
import com.baidu.ueditor.define.AppInfo;
import com.baidu.ueditor.define.BaseState;
import com.baidu.ueditor.define.FileType;
import com.baidu.ueditor.define.State;
import java.util.Map;
import org.apache.commons.codec.binary.Base64;
public final class Base64Uploader {
public static State save(String content, Map<String, Object> conf) {
byte[] data = decode(content);
long maxSize = ((Long) conf.get("maxSize")).longValue();
if (!validSize(data, maxSize)) {
return new BaseState(false, AppInfo.MAX_SIZE);
}
String suffix = FileType.getSuffix("JPG");
String savePath = PathFormat.parse((String) conf.get("savePath"),
(String) conf.get("filename"));
savePath = savePath + suffix;
String physicalPath = (String) conf.get("rootPath") + savePath;
State storageState = StorageManager.saveBinaryFile(data, physicalPath);
if (storageState.isSuccess()) {
storageState.putInfo("url", PathFormat.format(savePath));
storageState.putInfo("type", suffix);
storageState.putInfo("original", "");
}
return storageState;
}
private static byte[] decode(String content) {
return Base64.decodeBase64(content);
}
private static boolean validSize(byte[] data, long length) {
return data.length <= length;
}
}
\ No newline at end of file
package com.baidu.ueditor.upload;
import com.baidu.ueditor.PathFormat;
import com.baidu.ueditor.define.AppInfo;
import com.baidu.ueditor.define.BaseState;
import com.baidu.ueditor.define.FileType;
import com.baidu.ueditor.define.State;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.FileItemIterator;
import org.apache.commons.fileupload.FileItemStream;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
public class BinaryUploader {
public static final State save(HttpServletRequest request,
Map<String, Object> conf) {
FileItemStream fileStream = null;
boolean isAjaxUpload = request.getHeader( "X_Requested_With" ) != null;
if (!ServletFileUpload.isMultipartContent(request)) {
return new BaseState(false, AppInfo.NOT_MULTIPART_CONTENT);
}
ServletFileUpload upload = new ServletFileUpload(
new DiskFileItemFactory());
if ( isAjaxUpload ) {
upload.setHeaderEncoding( "UTF-8" );
}
try {
FileItemIterator iterator = upload.getItemIterator(request);
while (iterator.hasNext()) {
fileStream = iterator.next();
if (!fileStream.isFormField())
break;
fileStream = null;
}
if (fileStream == null) {
return new BaseState(false, AppInfo.NOTFOUND_UPLOAD_DATA);
}
String savePath = (String) conf.get("savePath");
String originFileName = fileStream.getName();
String suffix = FileType.getSuffixByFilename(originFileName);
originFileName = originFileName.substring(0,
originFileName.length() - suffix.length());
savePath = savePath + suffix;
long maxSize = ((Long) conf.get("maxSize")).longValue();
if (!validType(suffix, (String[]) conf.get("allowFiles"))) {
return new BaseState(false, AppInfo.NOT_ALLOW_FILE_TYPE);
}
savePath = PathFormat.parse(savePath, originFileName);
String physicalPath = (String) conf.get("rootPath") + savePath;
InputStream is = fileStream.openStream();
State storageState = StorageManager.saveFileByInputStream(is,
physicalPath, maxSize);
is.close();
if (storageState.isSuccess()) {
storageState.putInfo("url", PathFormat.format(savePath));
storageState.putInfo("type", suffix);
storageState.putInfo("original", originFileName + suffix);
}
return storageState;
} catch (FileUploadException e) {
return new BaseState(false, AppInfo.PARSE_REQUEST_ERROR);
} catch (IOException e) {
}
return new BaseState(false, AppInfo.IO_ERROR);
}
private static boolean validType(String type, String[] allowTypes) {
List<String> list = Arrays.asList(allowTypes);
return list.contains(type);
}
}
package com.baidu.ueditor.upload;
import com.baidu.ueditor.define.AppInfo;
import com.baidu.ueditor.define.BaseState;
import com.baidu.ueditor.define.State;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import org.apache.commons.io.FileUtils;
public class StorageManager {
public static final int BUFFER_SIZE = 8192;
public StorageManager() {
}
public static State saveBinaryFile(byte[] data, String path) {
File file = new File(path);
State state = valid(file);
if (!state.isSuccess()) {
return state;
}
try {
BufferedOutputStream bos = new BufferedOutputStream(
new FileOutputStream(file));
bos.write(data);
bos.flush();
bos.close();
} catch (IOException ioe) {
return new BaseState(false, AppInfo.IO_ERROR);
}
state = new BaseState(true, file.getAbsolutePath());
state.putInfo( "size", data.length );
state.putInfo( "title", file.getName() );
return state;
}
public static State saveFileByInputStream(InputStream is, String path,
long maxSize) {
State state = null;
File tmpFile = getTmpFile();
byte[] dataBuf = new byte[ 2048 ];
BufferedInputStream bis = new BufferedInputStream(is, StorageManager.BUFFER_SIZE);
try {
BufferedOutputStream bos = new BufferedOutputStream(
new FileOutputStream(tmpFile), StorageManager.BUFFER_SIZE);
int count = 0;
while ((count = bis.read(dataBuf)) != -1) {
bos.write(dataBuf, 0, count);
}
bos.flush();
bos.close();
if (tmpFile.length() > maxSize) {
tmpFile.delete();
return new BaseState(false, AppInfo.MAX_SIZE);
}
state = saveTmpFile(tmpFile, path);
if (!state.isSuccess()) {
tmpFile.delete();
}
return state;
} catch (IOException e) {
}
return new BaseState(false, AppInfo.IO_ERROR);
}
public static State saveFileByInputStream(InputStream is, String path) {
State state = null;
File tmpFile = getTmpFile();
byte[] dataBuf = new byte[ 2048 ];
BufferedInputStream bis = new BufferedInputStream(is, StorageManager.BUFFER_SIZE);
try {
BufferedOutputStream bos = new BufferedOutputStream(
new FileOutputStream(tmpFile), StorageManager.BUFFER_SIZE);
int count = 0;
while ((count = bis.read(dataBuf)) != -1) {
bos.write(dataBuf, 0, count);
}
bos.flush();
bos.close();
state = saveTmpFile(tmpFile, path);
if (!state.isSuccess()) {
tmpFile.delete();
}
return state;
} catch (IOException e) {
}
return new BaseState(false, AppInfo.IO_ERROR);
}
private static File getTmpFile() {
File tmpDir = FileUtils.getTempDirectory();
String tmpFileName = (Math.random() * 10000 + "").replace(".", "");
return new File(tmpDir, tmpFileName);
}
private static State saveTmpFile(File tmpFile, String path) {
State state = null;
File targetFile = new File(path);
if (targetFile.canWrite()) {
return new BaseState(false, AppInfo.PERMISSION_DENIED);
}
try {
FileUtils.moveFile(tmpFile, targetFile);
} catch (IOException e) {
return new BaseState(false, AppInfo.IO_ERROR);
}
state = new BaseState(true);
state.putInfo( "size", targetFile.length() );
state.putInfo( "title", targetFile.getName() );
return state;
}
private static State valid(File file) {
File parentPath = file.getParentFile();
if ((!parentPath.exists()) && (!parentPath.mkdirs())) {
return new BaseState(false, AppInfo.FAILED_CREATE_FILE);
}
if (!parentPath.canWrite()) {
return new BaseState(false, AppInfo.PERMISSION_DENIED);
}
return new BaseState(true);
}
}
package com.baidu.ueditor.upload;
import com.baidu.ueditor.define.State;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
public class Uploader {
private HttpServletRequest request = null;
private Map<String, Object> conf = null;
public Uploader(HttpServletRequest request, Map<String, Object> conf) {
this.request = request;
this.conf = conf;
}
public final State doExec() {
String filedName = (String) this.conf.get("fieldName");
State state = null;
if ("true".equals(this.conf.get("isBase64"))) {
state = Base64Uploader.save(this.request.getParameter(filedName),
this.conf);
} else {
state = BinaryUploader.save(this.request, this.conf);
}
return state;
}
}
......@@ -22,7 +22,6 @@ public class Subscriber {
handlers.put("video", new VideoMessageHandler());
handlers.put("shortvideo", new ShortVideoMessageHandler());
handlers.put("location", new LocationHandler());
handlers.put("link", new LinkMessageHandler());
}
public boolean receiveMessage(String message) {
String type="";
......
/**
* @Title: UEditorConfigController.java
* @Package com.hdp.customerservice.api
* @Description: TODO
* @author new12304508_163_com
* @date 2015年6月10日 上午10:18:00
* @version V1.0
*/
package com.hdp.customerservice.api;
import java.io.File;
import java.io.FileOutputStream;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import com.baidu.ueditor.ActionEnter;
@Controller
public class UEditorConfigController {
/**
* @Title: UEditorConfigController.java
* @Package com.hdp.customerservice.api
* @Description: TODO
* @author new12304508_163_com
* @date 2015年6月10日 上午10:18:00
* @version V1.0
*/
@RequestMapping(value="/ueditor",method=RequestMethod.GET)
public @ResponseBody String config(HttpServletRequest request){
return new ActionEnter( request, request.getServletContext().getRealPath("/")).exec();
}
@RequestMapping(value="/ueditor",method=RequestMethod.POST)
public @ResponseBody String upload(@RequestParam("upfile") MultipartFile upfile,HttpServletRequest request, HttpServletResponse response) throws Exception {
String result = "";
String rootPath=request.getServletContext().getRealPath("");
FileOutputStream out = null;
try {
File file = new File(rootPath);
if(!file.exists()) file.mkdirs();
String fname = ""+System.currentTimeMillis(),
oname = upfile.getOriginalFilename();
out = new FileOutputStream(rootPath + "/" + fname);
out.write(upfile.getBytes());
out.close();
result = "{\"name\":\""+ fname +"\", \"originalName\": \""+ oname +"\", \"size\": "+ upfile.getSize() +", \"state\": \"SUCCESS\", \"type\": \"PNG\", \"url\": \"/" + fname+"\"}";
result = result.replaceAll( "\\\\", "\\\\" );
} catch(Exception e) {
e.printStackTrace();
} finally {
out.close();
}
return result;
}
}
package com.hdp.pi.wechat.handler;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.DocumentHelper;
import org.springframework.stereotype.Component;
import com.hdp.pi.wechat.model.BaseEntity;
import com.hdp.pi.wechat.model.LinkMessage;
/**
* Created by Veal on 2015/5/15.
*/
@Component
public class LinkMessageHandler extends MessageHandler {
@Override
protected BaseEntity decode(String message) throws DocumentException {
Document doc = DocumentHelper.parseText(message);
LinkMessage linkMessage=new LinkMessage();
linkMessage.msgId= getXMLNodeText(doc,"/xml/MsgId");
linkMessage.title= getXMLNodeText(doc,"/xml/Title");
linkMessage.description= getXMLNodeText(doc,"/xml/Description");
linkMessage.url= getXMLNodeText(doc,"/xml/Url");
return linkMessage;
}
}
package com.hdp.pi.wechat.model;
/**
* Created by Veal on 2015/5/12.
*/
public class LinkMessage extends BaseEntity{
public String msgId;
public String title;
public String description;
public String url;
}
.jd img{
background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top;
cursor:pointer;width:35px;height:35px;display:block;
}
.pp img{
background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top;
cursor:pointer;width:25px;height:25px;display:block;
}
.ldw img{
background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top;
cursor:pointer;width:35px;height:35px;display:block;
}
.tsj img{
background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top;
cursor:pointer;width:35px;height:35px;display:block;
}
.cat img{
background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top;
cursor:pointer;width:35px;height:35px;display:block;
}
.bb img{
background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top;
cursor:pointer;width:35px;height:35px;display:block;
}
.youa img{
background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top;
cursor:pointer;width:35px;height:35px;display:block;
}
.smileytable td {height: 37px;}
#tabPanel{margin-left:5px;overflow: hidden;}
#tabContent {float:left;background:#FFFFFF;}
#tabContent div{display: none;width:480px;overflow:hidden;}
#tabIconReview.show{left:17px;display:block;}
.menuFocus{background:#ACCD3C;}
.menuDefault{background:#FFFFFF;}
#tabIconReview{position:absolute;left:406px;left:398px \9;top:41px;z-index:65533;width:90px;height:76px;}
img.review{width:90px;height:76px;border:2px solid #9cb945;background:#FFFFFF;background-position:center;background-repeat:no-repeat;}
.wrapper .tabbody{position:relative;float:left;clear:both;padding:10px;width: 95%;}
.tabbody table{width: 100%;}
.tabbody td{border:1px solid #BAC498;}
.tabbody td span{display: block;zoom:1;padding:0 4px;}
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="robots" content="noindex, nofollow"/>
<script type="text/javascript" src="../internal.js"></script>
<link rel="stylesheet" type="text/css" href="emotion.css">
</head>
<body>
<div id="tabPanel" class="wrapper">
<div id="tabHeads" class="tabhead">
<span><var id="lang_input_choice"></var></span>
<span><var id="lang_input_Tuzki"></var></span>
<span><var id="lang_input_lvdouwa"></var></span>
<span><var id="lang_input_BOBO"></var></span>
<span><var id="lang_input_babyCat"></var></span>
<span><var id="lang_input_bubble"></var></span>
<span><var id="lang_input_youa"></var></span>
</div>
<div id="tabBodys" class="tabbody">
<div id="tab0"></div>
<div id="tab1"></div>
<div id="tab2"></div>
<div id="tab3"></div>
<div id="tab4"></div>
<div id="tab5"></div>
<div id="tab6"></div>
</div>
</div>
<div id="tabIconReview">
<img id='faceReview' class='review' src="../../themes/default/images/spacer.gif"/>
</div>
<script type="text/javascript" src="emotion.js"></script>
<script type="text/javascript">
var emotion = {
tabNum:7, //切换面板数量
SmilmgName:{ tab0:['j_00', 84], tab1:['t_00', 40], tab2:['w_00', 52], tab3:['B_00', 63], tab4:['C_00', 20], tab5:['i_f', 50], tab6:['y_00', 40] }, //图片前缀名
imageFolders:{ tab0:'jx2/', tab1:'tsj/', tab2:'ldw/', tab3:'bobo/', tab4:'babycat/', tab5:'face/', tab6:'youa/'}, //图片对应文件夹路径
imageCss:{tab0:'jd', tab1:'tsj', tab2:'ldw', tab3:'bb', tab4:'cat', tab5:'pp', tab6:'youa'}, //图片css类名
imageCssOffset:{tab0:35, tab1:35, tab2:35, tab3:35, tab4:35, tab5:25, tab6:35}, //图片偏移
SmileyInfor:{
tab0:['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '打酱油', '俯卧撑', '气愤', '?', '吻', '怒', '胜利', 'HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '微笑', '亲吻', '调皮', '惊恐', '耍酷', '发火', '害羞', '汗水', '大哭', '', '加油', '困', '你NB', '晕倒', '开心', '偷笑', '大哭', '滴汗', '叹气', '超赞', '??', '飞吻', '天使', '撒花', '生气', '被砸', '吓傻', '随意吐'],
tab1:['Kiss', 'Love', 'Yeah', '啊!', '背扭', '顶', '抖胸', '88', '汗', '瞌睡', '鲁拉', '拍砖', '揉脸', '生日快乐', '摊手', '睡觉', '瘫坐', '无聊', '星星闪', '旋转', '也不行', '郁闷', '正Music', '抓墙', '撞墙至死', '歪头', '戳眼', '飘过', '互相拍砖', '砍死你', '扔桌子', '少林寺', '什么?', '转头', '我爱牛奶', '我踢', '摇晃', '晕厥', '在笼子里', '震荡'],
tab2:['大笑', '瀑布汗~', '惊讶', '臭美', '傻笑', '抛媚眼', '发怒', '我错了', 'money', '气愤', '挑逗', '吻', '怒', '胜利', '委屈', '受伤', '说啥呢?', '闭嘴', '不', '逗你玩儿', '飞吻', '眩晕', '魔法', '我来了', '睡了', '我打', '闭嘴', '打', '打晕了', '刷牙', '爆揍', '炸弹', '倒立', '刮胡子', '邪恶的笑', '不要不要', '爱恋中', '放大仔细看', '偷窥', '超高兴', '晕', '松口气', '我跑', '享受', '修养', '哭', '汗', '啊~', '热烈欢迎', '打酱油', '俯卧撑', '?'],
tab3:['HI', 'KISS', '不说', '不要', '扯花', '大心', '顶', '大惊', '飞吻', '鬼脸', '害羞', '口水', '狂哭', '来', '泪眼', '流泪', '生气', '吐舌', '喜欢', '旋转', '再见', '抓狂', '汗', '鄙视', '拜', '吐血', '嘘', '打人', '蹦跳', '变脸', '扯肉', '吃To', '吃花', '吹泡泡糖', '大变身', '飞天舞', '回眸', '可怜', '猛抽', '泡泡', '苹果', '亲', '', '骚舞', '烧香', '睡', '套娃娃', '捅捅', '舞倒', '西红柿', '爱慕', '摇', '摇摆', '杂耍', '招财', '被殴', '被球闷', '大惊', '理想', '欧打', '呕吐', '碎', '吐痰'],
tab4:['发财了', '吃西瓜', '套牢', '害羞', '庆祝', '我来了', '敲打', '晕了', '胜利', '臭美', '被打了', '贪吃', '迎接', '酷', '顶', '幸运', '爱心', '躲', '送花', '选择'],
tab5:['微笑', '亲吻', '调皮', '惊讶', '耍酷', '发火', '害羞', '汗水', '大哭', '得意', '鄙视', '困', '夸奖', '晕倒', '疑问', '媒婆', '狂吐', '青蛙', '发愁', '亲吻', '', '爱心', '心碎', '玫瑰', '礼物', '哭', '奸笑', '可爱', '得意', '呲牙', '暴汗', '楚楚可怜', '困', '哭', '生气', '惊讶', '口水', '彩虹', '夜空', '太阳', '钱钱', '灯泡', '咖啡', '蛋糕', '音乐', '爱', '胜利', '赞', '鄙视', 'OK'],
tab6:['男兜', '女兜', '开心', '乖乖', '偷笑', '大笑', '抽泣', '大哭', '无奈', '滴汗', '叹气', '狂晕', '委屈', '超赞', '??', '疑问', '飞吻', '天使', '撒花', '生气', '被砸', '口水', '泪奔', '吓傻', '吐舌头', '点头', '随意吐', '旋转', '困困', '鄙视', '狂顶', '篮球', '再见', '欢迎光临', '恭喜发财', '稍等', '我在线', '恕不议价', '库房有货', '货在路上']
}
};
</script>
</body>
</html>
\ No newline at end of file
window.onload = function () {
editor.setOpt({
emotionLocalization:false
});
emotion.SmileyPath = editor.options.emotionLocalization === true ? 'images/' : "http://img.baidu.com/hi/";
emotion.SmileyBox = createTabList( emotion.tabNum );
emotion.tabExist = createArr( emotion.tabNum );
initImgName();
initEvtHandler( "tabHeads" );
};
function initImgName() {
for ( var pro in emotion.SmilmgName ) {
var tempName = emotion.SmilmgName[pro],
tempBox = emotion.SmileyBox[pro],
tempStr = "";
if ( tempBox.length ) return;
for ( var i = 1; i <= tempName[1]; i++ ) {
tempStr = tempName[0];
if ( i < 10 ) tempStr = tempStr + '0';
tempStr = tempStr + i + '.gif';
tempBox.push( tempStr );
}
}
}
function initEvtHandler( conId ) {
var tabHeads = $G( conId );
for ( var i = 0, j = 0; i < tabHeads.childNodes.length; i++ ) {
var tabObj = tabHeads.childNodes[i];
if ( tabObj.nodeType == 1 ) {
domUtils.on( tabObj, "click", (function ( index ) {
return function () {
switchTab( index );
};
})( j ) );
j++;
}
}
switchTab( 0 );
$G( "tabIconReview" ).style.display = 'none';
}
function InsertSmiley( url, evt ) {
var obj = {
src:editor.options.emotionLocalization ? editor.options.UEDITOR_HOME_URL + "dialogs/emotion/" + url : url
};
obj._src = obj.src;
editor.execCommand( 'insertimage', obj );
if ( !evt.ctrlKey ) {
dialog.popup.hide();
}
}
function switchTab( index ) {
autoHeight( index );
if ( emotion.tabExist[index] == 0 ) {
emotion.tabExist[index] = 1;
createTab( 'tab' + index );
}
//获取呈现元素句柄数组
var tabHeads = $G( "tabHeads" ).getElementsByTagName( "span" ),
tabBodys = $G( "tabBodys" ).getElementsByTagName( "div" ),
i = 0, L = tabHeads.length;
//隐藏所有呈现元素
for ( ; i < L; i++ ) {
tabHeads[i].className = "";
tabBodys[i].style.display = "none";
}
//显示对应呈现元素
tabHeads[index].className = "focus";
tabBodys[index].style.display = "block";
}
function autoHeight( index ) {
var iframe = dialog.getDom( "iframe" ),
parent = iframe.parentNode.parentNode;
switch ( index ) {
case 0:
iframe.style.height = "380px";
parent.style.height = "392px";
break;
case 1:
iframe.style.height = "220px";
parent.style.height = "232px";
break;
case 2:
iframe.style.height = "260px";
parent.style.height = "272px";
break;
case 3:
iframe.style.height = "300px";
parent.style.height = "312px";
break;
case 4:
iframe.style.height = "140px";
parent.style.height = "152px";
break;
case 5:
iframe.style.height = "260px";
parent.style.height = "272px";
break;
case 6:
iframe.style.height = "230px";
parent.style.height = "242px";
break;
default:
}
}
function createTab( tabName ) {
var faceVersion = "?v=1.1", //版本号
tab = $G( tabName ), //获取将要生成的Div句柄
imagePath = emotion.SmileyPath + emotion.imageFolders[tabName], //获取显示表情和预览表情的路径
positionLine = 11 / 2, //中间数
iWidth = iHeight = 35, //图片长宽
iColWidth = 3, //表格剩余空间的显示比例
tableCss = emotion.imageCss[tabName],
cssOffset = emotion.imageCssOffset[tabName],
textHTML = ['<table class="smileytable">'],
i = 0, imgNum = emotion.SmileyBox[tabName].length, imgColNum = 11, faceImage,
sUrl, realUrl, posflag, offset, infor;
for ( ; i < imgNum; ) {
textHTML.push( '<tr>' );
for ( var j = 0; j < imgColNum; j++, i++ ) {
faceImage = emotion.SmileyBox[tabName][i];
if ( faceImage ) {
sUrl = imagePath + faceImage + faceVersion;
realUrl = imagePath + faceImage;
posflag = j < positionLine ? 0 : 1;
offset = cssOffset * i * (-1) - 1;
infor = emotion.SmileyInfor[tabName][i];
textHTML.push( '<td class="' + tableCss + '" border="1" width="' + iColWidth + '%" style="border-collapse:collapse;" align="center" bgcolor="transparent" onclick="InsertSmiley(\'' + realUrl.replace( /'/g, "\\'" ) + '\',event)" onmouseover="over(this,\'' + sUrl + '\',\'' + posflag + '\')" onmouseout="out(this)">' );
textHTML.push( '<span>' );
textHTML.push( '<img style="background-position:left ' + offset + 'px;" title="' + infor + '" src="' + emotion.SmileyPath + (editor.options.emotionLocalization ? '0.gif" width="' : 'default/0.gif" width="') + iWidth + '" height="' + iHeight + '"></img>' );
textHTML.push( '</span>' );
} else {
textHTML.push( '<td width="' + iColWidth + '%" bgcolor="#FFFFFF">' );
}
textHTML.push( '</td>' );
}
textHTML.push( '</tr>' );
}
textHTML.push( '</table>' );
textHTML = textHTML.join( "" );
tab.innerHTML = textHTML;
}
function over( td, srcPath, posFlag ) {
td.style.backgroundColor = "#ACCD3C";
$G( 'faceReview' ).style.backgroundImage = "url(" + srcPath + ")";
if ( posFlag == 1 ) $G( "tabIconReview" ).className = "show";
$G( "tabIconReview" ).style.display = 'block';
}
function out( td ) {
td.style.backgroundColor = "transparent";
var tabIconRevew = $G( "tabIconReview" );
tabIconRevew.className = "";
tabIconRevew.style.display = 'none';
}
function createTabList( tabNum ) {
var obj = {};
for ( var i = 0; i < tabNum; i++ ) {
obj["tab" + i] = [];
}
return obj;
}
function createArr( tabNum ) {
var arr = [];
for ( var i = 0; i < tabNum; i++ ) {
arr[i] = 0;
}
return arr;
}
(function () {
var parent = window.parent;
//dialog对象
dialog = parent.$EDITORUI[window.frameElement.id.replace( /_iframe$/, '' )];
//当前打开dialog的编辑器实例
editor = dialog.editor;
UE = parent.UE;
domUtils = UE.dom.domUtils;
utils = UE.utils;
browser = UE.browser;
ajax = UE.ajax;
$G = function ( id ) {
return document.getElementById( id )
};
//focus元素
$focus = function ( node ) {
setTimeout( function () {
if ( browser.ie ) {
var r = node.createTextRange();
r.collapse( false );
r.select();
} else {
node.focus()
}
}, 0 )
};
utils.loadFile(document,{
href:editor.options.themePath + editor.options.theme + "/dialogbase.css?cache="+Math.random(),
tag:"link",
type:"text/css",
rel:"stylesheet"
});
lang = editor.getLang(dialog.className.split( "-" )[2]);
if(lang){
domUtils.on(window,'load',function () {
var langImgPath = editor.options.langPath + editor.options.lang + "/images/";
//针对静态资源
for ( var i in lang["static"] ) {
var dom = $G( i );
if(!dom) continue;
var tagName = dom.tagName,
content = lang["static"][i];
if(content.src){
//clone
content = utils.extend({},content,false);
content.src = langImgPath + content.src;
}
if(content.style){
content = utils.extend({},content,false);
content.style = content.style.replace(/url\s*\(/g,"url(" + langImgPath)
}
switch ( tagName.toLowerCase() ) {
case "var":
dom.parentNode.replaceChild( document.createTextNode( content ), dom );
break;
case "select":
var ops = dom.options;
for ( var j = 0, oj; oj = ops[j]; ) {
oj.innerHTML = content.options[j++];
}
for ( var p in content ) {
p != "options" && dom.setAttribute( p, content[p] );
}
break;
default :
domUtils.setAttributes( dom, content);
}
}
} );
}
})();
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script type="text/javascript" src="../internal.js"></script>
<style type="text/css">
*{margin:0;padding:0;color: #838383;}
table{font-size: 12px;margin: 10px;line-height: 30px}
.txt{width:300px;height:21px;line-height:21px;border:1px solid #d7d7d7;}
</style>
</head>
<body>
<table>
<tr>
<td><label for="text"> <var id="lang_input_text"></var></label></td>
<td><input class="txt" id="text" type="text" disabled="true"/></td>
</tr>
<tr>
<td><label for="href"> <var id="lang_input_url"></var></label></td>
<td><input class="txt" id="href" type="text" /></td>
</tr>
<tr>
<td><label for="title"> <var id="lang_input_title"></var></label></td>
<td><input class="txt" id="title" type="text"/></td>
</tr>
<tr>
<td colspan="2">
<label for="target"><var id="lang_input_target"></var></label>
<input id="target" type="checkbox"/>
</td>
</tr>
<tr>
<td colspan="2" id="msg"></td>
</tr>
</table>
<script type="text/javascript">
var range = editor.selection.getRange(),
link = range.collapsed ? editor.queryCommandValue( "link" ) : editor.selection.getStart(),
url,
text = $G('text'),
rangeLink = domUtils.findParentByTagName(range.getCommonAncestor(),'a',true),
orgText;
link = domUtils.findParentByTagName( link, "a", true );
if(link){
url = utils.html(link.getAttribute( '_href' ) || link.getAttribute( 'href', 2 ));
if(rangeLink === link && !link.getElementsByTagName('img').length){
text.removeAttribute('disabled');
orgText = text.value = link[browser.ie ? 'innerText':'textContent'];
}else{
text.setAttribute('disabled','true');
text.value = lang.validLink;
}
}else{
if(range.collapsed){
text.removeAttribute('disabled');
text.value = '';
}else{
text.setAttribute('disabled','true');
text.value = lang.validLink;
}
}
$G("title").value = url ? link.title : "";
$G("href").value = url ? url: '';
$G("target").checked = url && link.target == "_blank" ? true : false;
$focus($G("href"));
function handleDialogOk(){
var href =$G('href').value.replace(/^\s+|\s+$/g, '');
if(href){
if(!hrefStartWith(href,["http","/","ftp://",'#'])) {
href = "http://" + href;
}
var obj = {
'href' : href,
'target' : $G("target").checked ? "_blank" : '_self',
'title' : $G("title").value.replace(/^\s+|\s+$/g, ''),
'_href':href
};
//修改链接内容的情况太特殊了,所以先做到这里了
//todo:情况多的时候,做到command里
if(orgText && text.value != orgText){
link[browser.ie ? 'innerText' : 'textContent'] = obj.textValue = text.value;
range.selectNode(link).select()
}
if(range.collapsed){
obj.textValue = text.value;
}
editor.execCommand('link',utils.clearEmptyAttrs(obj) );
dialog.close();
}
}
dialog.onok = handleDialogOk;
$G('href').onkeydown = $G('title').onkeydown = function(evt){
evt = evt || window.event;
if (evt.keyCode == 13) {
handleDialogOk();
return false;
}
};
$G('href').onblur = function(){
if(!hrefStartWith(this.value,["http","/","ftp://",'#'])){
$G("msg").innerHTML = "<span style='color: red'>"+lang.httpPrompt+"</span>";
}else{
$G("msg").innerHTML = "";
}
};
function hrefStartWith(href,arr){
href = href.replace(/^\s+|\s+$/g, '');
for(var i=0,ai;ai=arr[i++];){
if(href.indexOf(ai)==0){
return true;
}
}
return false;
}
</script>
</body>
</html>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<script type="text/javascript" src="../internal.js"></script>
<style type="text/css">
*{color: #838383}
html,body {
font-size: 12px;
width:100%;
height:100%;
overflow: hidden;
margin:0px;
padding:0px;
}
h2 { font-size: 16px; margin: 20px auto;}
.content{
padding:5px 15px 0 15px;
height:100%;
}
dt,dd { margin-left: 0; padding-left: 0;}
dt a { display: block;
height: 30px;
line-height: 30px;
width: 55px;
background: #EFEFEF;
border: 1px solid #CCC;
padding: 0 10px;
text-decoration: none;
}
dt a:hover{
background: #e0e0e0;
border-color: #999
}
dt a:active{
background: #ccc;
border-color: #999;
color: #666;
}
dd { line-height:20px;margin-top: 10px;}
span{ padding-right:4px;}
input{width:210px;height:21px;background: #FFF;border:1px solid #d7d7d7;padding: 0px; margin: 0px; }
</style>
</head>
<body>
<div class="content">
<h2><var id="lang_showMsg"></var></h2>
<dl>
<dt><a href="../../third-party/snapscreen/UEditorSnapscreen.exe" target="_blank" id="downlink"><var id="lang_download"></var></a></dt>
<dd><var id="lang_step1"></var></dd>
<dd><var id="lang_step2"></var></dd>
</dl>
</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>完整demo</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<script type="text/javascript" charset="utf-8" src="ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="ueditor.all.min.js"> </script>
<style type="text/css">
div{
width:100%;
}
</style>
</head>
<body>
<div>
<h1>完整demo</h1>
<script id="editor" type="text/plain" style="width:1024px;height:500px;"></script>
</div>
<div id="btns">
<div>
<button onclick="getAllHtml()">获得整个html的内容</button>
<button onclick="getContent()">获得内容</button>
<button onclick="setContent()">写入内容</button>
<button onclick="setContent(true)">追加内容</button>
<button onclick="getContentTxt()">获得纯文本</button>
<button onclick="getPlainTxt()">获得带格式的纯文本</button>
<button onclick="hasContent()">判断是否有内容</button>
<button onclick="setFocus()">使编辑器获得焦点</button>
<button onmousedown="isFocus(event)">编辑器是否获得焦点</button>
<button onmousedown="setblur(event)" >编辑器失去焦点</button>
</div>
<div>
<button onclick="getText()">获得当前选中的文本</button>
<button onclick="insertHtml()">插入给定的内容</button>
<button id="enable" onclick="setEnabled()">可以编辑</button>
<button onclick="setDisabled()">不可编辑</button>
<button onclick=" UE.getEditor('editor').setHide()">隐藏编辑器</button>
<button onclick=" UE.getEditor('editor').setShow()">显示编辑器</button>
</div>
</div>
<div>
<button onclick="createEditor()">
创建编辑器</button>
<button onclick="deleteEditor()">
删除编辑器</button>
</div>
<script type="text/javascript">
//实例化编辑器
//建议使用工厂方法getEditor创建和引用编辑器实例,如果在某个闭包下引用该编辑器,直接调用UE.getEditor('editor')就能拿到相关的实例
var ue = UE.getEditor('editor');
function isFocus(e){
alert(UE.getEditor('editor').isFocus());
UE.dom.domUtils.preventDefault(e)
}
function setblur(e){
UE.getEditor('editor').blur();
UE.dom.domUtils.preventDefault(e)
}
function insertHtml() {
var value = prompt('插入html代码', '');
UE.getEditor('editor').execCommand('insertHtml', value)
}
function createEditor() {
enableBtn();
UE.getEditor('editor');
}
function getAllHtml() {
alert(UE.getEditor('editor').getAllHtml())
}
function getContent() {
var arr = [];
arr.push("使用editor.getContent()方法可以获得编辑器的内容");
arr.push("内容为:");
arr.push(UE.getEditor('editor').getContent());
alert(arr.join("\n"));
}
function getPlainTxt() {
var arr = [];
arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
arr.push("内容为:");
arr.push(UE.getEditor('editor').getPlainTxt());
alert(arr.join('\n'))
}
function setContent(isAppendTo) {
var arr = [];
arr.push("使用editor.setContent('欢迎使用ueditor')方法可以设置编辑器的内容");
UE.getEditor('editor').setContent('欢迎使用ueditor', isAppendTo);
alert(arr.join("\n"));
}
function setDisabled() {
UE.getEditor('editor').setDisabled('fullscreen');
disableBtn("enable");
}
function setEnabled() {
UE.getEditor('editor').setEnabled();
enableBtn();
}
function getText() {
//当你点击按钮时编辑区域已经失去了焦点,如果直接用getText将不会得到内容,所以要在选回来,然后取得内容
var range = UE.getEditor('editor').selection.getRange();
range.select();
var txt = UE.getEditor('editor').selection.getText();
alert(txt)
}
function getContentTxt() {
var arr = [];
arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
arr.push("编辑器的纯文本内容为:");
arr.push(UE.getEditor('editor').getContentTxt());
alert(arr.join("\n"));
}
function hasContent() {
var arr = [];
arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
arr.push("判断结果为:");
arr.push(UE.getEditor('editor').hasContents());
alert(arr.join("\n"));
}
function setFocus() {
UE.getEditor('editor').focus();
}
function deleteEditor() {
disableBtn();
UE.getEditor('editor').destroy();
}
function disableBtn(str) {
var div = document.getElementById('btns');
var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
for (var i = 0, btn; btn = btns[i++];) {
if (btn.id == str) {
UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
} else {
btn.setAttribute("disabled", "true");
}
}
}
function enableBtn() {
var div = document.getElementById('btns');
var btns = UE.dom.domUtils.getElementsByTagName(div, "button");
for (var i = 0, btn; btn = btns[i++];) {
UE.dom.domUtils.removeAttributes(btn, ["disabled"]);
}
}
</script>
</body>
</html>
\ No newline at end of file
/**
* Created with JetBrains PhpStorm.
* User: taoqili
* Date: 12-6-12
* Time: 下午5:02
* To change this template use File | Settings | File Templates.
*/
UE.I18N['zh-cn'] = {
'labelMap':{
'anchor':'锚点', 'undo':'撤销', 'redo':'重做', 'bold':'加粗', 'indent':'首行缩进', 'snapscreen':'截图',
'italic':'斜体', 'underline':'下划线', 'strikethrough':'删除线', 'subscript':'下标','fontborder':'字符边框',
'superscript':'上标', 'formatmatch':'格式刷', 'source':'源代码', 'blockquote':'引用',
'pasteplain':'纯文本粘贴模式', 'selectall':'全选', 'print':'打印', 'preview':'预览',
'horizontal':'分隔线', 'removeformat':'清除格式', 'time':'时间', 'date':'日期',
'unlink':'取消链接', 'insertrow':'前插入行', 'insertcol':'前插入列', 'mergeright':'右合并单元格', 'mergedown':'下合并单元格',
'deleterow':'删除行', 'deletecol':'删除列', 'splittorows':'拆分成行',
'splittocols':'拆分成列', 'splittocells':'完全拆分单元格','deletecaption':'删除表格标题','inserttitle':'插入标题',
'mergecells':'合并多个单元格', 'deletetable':'删除表格', 'cleardoc':'清空文档','insertparagraphbeforetable':"表格前插入行",'insertcode':'代码语言',
'fontfamily':'字体', 'fontsize':'字号', 'paragraph':'段落格式', 'simpleupload':'单图上传', 'insertimage':'多图上传','edittable':'表格属性','edittd':'单元格属性', 'link':'超链接',
'emotion':'表情', 'spechars':'特殊字符', 'searchreplace':'查询替换', 'map':'Baidu地图', 'gmap':'Google地图',
'insertvideo':'视频', 'help':'帮助', 'justifyleft':'居左对齐', 'justifyright':'居右对齐', 'justifycenter':'居中对齐',
'justifyjustify':'两端对齐', 'forecolor':'字体颜色', 'backcolor':'背景色', 'insertorderedlist':'有序列表',
'insertunorderedlist':'无序列表', 'fullscreen':'全屏', 'directionalityltr':'从左向右输入', 'directionalityrtl':'从右向左输入',
'rowspacingtop':'段前距', 'rowspacingbottom':'段后距', 'pagebreak':'分页', 'insertframe':'插入Iframe', 'imagenone':'默认',
'imageleft':'左浮动', 'imageright':'右浮动', 'attachment':'附件', 'imagecenter':'居中', 'wordimage':'图片转存',
'lineheight':'行间距','edittip' :'编辑提示','customstyle':'自定义标题', 'autotypeset':'自动排版',
'webapp':'百度应用','touppercase':'字母大写', 'tolowercase':'字母小写','background':'背景','template':'模板','scrawl':'涂鸦',
'music':'音乐','inserttable':'插入表格','drafts': '从草稿箱加载', 'charts': '图表'
},
'insertorderedlist':{
'num':'1,2,3...',
'num1':'1),2),3)...',
'num2':'(1),(2),(3)...',
'cn':'一,二,三....',
'cn1':'一),二),三)....',
'cn2':'(一),(二),(三)....',
'decimal':'1,2,3...',
'lower-alpha':'a,b,c...',
'lower-roman':'i,ii,iii...',
'upper-alpha':'A,B,C...',
'upper-roman':'I,II,III...'
},
'insertunorderedlist':{
'circle':'○ 大圆圈',
'disc':'● 小黑点',
'square':'■ 小方块 ',
'dash' :'— 破折号',
'dot':' 。 小圆圈'
},
'paragraph':{'p':'段落', 'h1':'标题 1', 'h2':'标题 2', 'h3':'标题 3', 'h4':'标题 4', 'h5':'标题 5', 'h6':'标题 6'},
'fontfamily':{
'songti':'宋体',
'kaiti':'楷体',
'heiti':'黑体',
'lishu':'隶书',
'yahei':'微软雅黑',
'andaleMono':'andale mono',
'arial': 'arial',
'arialBlack':'arial black',
'comicSansMs':'comic sans ms',
'impact':'impact',
'timesNewRoman':'times new roman'
},
'customstyle':{
'tc':'标题居中',
'tl':'标题居左',
'im':'强调',
'hi':'明显强调'
},
'autoupload': {
'exceedSizeError': '文件大小超出限制',
'exceedTypeError': '文件格式不允许',
'jsonEncodeError': '服务器返回格式错误',
'loading':"正在上传...",
'loadError':"上传错误",
'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!'
},
'simpleupload':{
'exceedSizeError': '文件大小超出限制',
'exceedTypeError': '文件格式不允许',
'jsonEncodeError': '服务器返回格式错误',
'loading':"正在上传...",
'loadError':"上传错误",
'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!'
},
'elementPathTip':"元素路径",
'wordCountTip':"字数统计",
'wordCountMsg':'当前已输入{#count}个字符, 您还可以输入{#leave}个字符。 ',
'wordOverFlowMsg':'<span style="color:red;">字数超出最大允许值,服务器可能拒绝保存!</span>',
'ok':"确认",
'cancel':"取消",
'closeDialog':"关闭对话框",
'tableDrag':"表格拖动必须引入uiUtils.js文件!",
'autofloatMsg':"工具栏浮动依赖编辑器UI,您首先需要引入UI文件!",
'loadconfigError': '获取后台配置项请求出错,上传功能将不能正常使用!',
'loadconfigFormatError': '后台配置项返回格式出错,上传功能将不能正常使用!',
'loadconfigHttpError': '请求后台配置项http错误,上传功能将不能正常使用!',
'snapScreen_plugin':{
'browserMsg':"仅支持IE浏览器!",
'callBackErrorMsg':"服务器返回数据有误,请检查配置项之后重试。",
'uploadErrorMsg':"截图上传失败,请检查服务器端环境! "
},
'insertcode':{
'as3':'ActionScript 3',
'bash':'Bash/Shell',
'cpp':'C/C++',
'css':'CSS',
'cf':'ColdFusion',
'c#':'C#',
'delphi':'Delphi',
'diff':'Diff',
'erlang':'Erlang',
'groovy':'Groovy',
'html':'HTML',
'java':'Java',
'jfx':'JavaFX',
'js':'JavaScript',
'pl':'Perl',
'php':'PHP',
'plain':'Plain Text',
'ps':'PowerShell',
'python':'Python',
'ruby':'Ruby',
'scala':'Scala',
'sql':'SQL',
'vb':'Visual Basic',
'xml':'XML'
},
'confirmClear':"确定清空当前文档么?",
'contextMenu':{
'delete':"删除",
'selectall':"全选",
'deletecode':"删除代码",
'cleardoc':"清空文档",
'confirmclear':"确定清空当前文档么?",
'unlink':"删除超链接",
'paragraph':"段落格式",
'edittable':"表格属性",
'aligntd':"单元格对齐方式",
'aligntable':'表格对齐方式',
'tableleft':'左浮动',
'tablecenter':'居中显示',
'tableright':'右浮动',
'edittd':"单元格属性",
'setbordervisible':'设置表格边线可见',
'justifyleft':'左对齐',
'justifyright':'右对齐',
'justifycenter':'居中对齐',
'justifyjustify':'两端对齐',
'table':"表格",
'inserttable':'插入表格',
'deletetable':"删除表格",
'insertparagraphbefore':"前插入段落",
'insertparagraphafter':'后插入段落',
'deleterow':"删除当前行",
'deletecol':"删除当前列",
'insertrow':"前插入行",
'insertcol':"左插入列",
'insertrownext':'后插入行',
'insertcolnext':'右插入列',
'insertcaption':'插入表格名称',
'deletecaption':'删除表格名称',
'inserttitle':'插入表格标题行',
'deletetitle':'删除表格标题行',
'inserttitlecol':'插入表格标题列',
'deletetitlecol':'删除表格标题列',
'averageDiseRow':'平均分布各行',
'averageDisCol':'平均分布各列',
'mergeright':"向右合并",
'mergeleft':"向左合并",
'mergedown':"向下合并",
'mergecells':"合并单元格",
'splittocells':"完全拆分单元格",
'splittocols':"拆分成列",
'splittorows':"拆分成行",
'tablesort':'表格排序',
'enablesort':'设置表格可排序',
'disablesort':'取消表格可排序',
'reversecurrent':'逆序当前',
'orderbyasc':'按ASCII字符升序',
'reversebyasc':'按ASCII字符降序',
'orderbynum':'按数值大小升序',
'reversebynum':'按数值大小降序',
'borderbk':'边框底纹',
'setcolor':'表格隔行变色',
'unsetcolor':'取消表格隔行变色',
'setbackground':'选区背景隔行',
'unsetbackground':'取消选区背景',
'redandblue':'红蓝相间',
'threecolorgradient':'三色渐变',
'copy':"复制(Ctrl + c)",
'copymsg': "浏览器不支持,请使用 'Ctrl + c'",
'paste':"粘贴(Ctrl + v)",
'pastemsg': "浏览器不支持,请使用 'Ctrl + v'"
},
'copymsg': "浏览器不支持,请使用 'Ctrl + c'",
'pastemsg': "浏览器不支持,请使用 'Ctrl + v'",
'anthorMsg':"链接",
'clearColor':'清空颜色',
'standardColor':'标准颜色',
'themeColor':'主题颜色',
'property':'属性',
'default':'默认',
'modify':'修改',
'justifyleft':'左对齐',
'justifyright':'右对齐',
'justifycenter':'居中',
'justify':'默认',
'clear':'清除',
'anchorMsg':'锚点',
'delete':'删除',
'clickToUpload':"点击上传",
'unset':'尚未设置语言文件',
't_row':'行',
't_col':'列',
'more':'更多',
'pasteOpt':'粘贴选项',
'pasteSourceFormat':"保留源格式",
'tagFormat':'只保留标签',
'pasteTextFormat':'只保留文本',
'autoTypeSet':{
'mergeLine':"合并空行",
'delLine':"清除空行",
'removeFormat':"清除格式",
'indent':"首行缩进",
'alignment':"对齐方式",
'imageFloat':"图片浮动",
'removeFontsize':"清除字号",
'removeFontFamily':"清除字体",
'removeHtml':"清除冗余HTML代码",
'pasteFilter':"粘贴过滤",
'run':"执行",
'symbol':'符号转换',
'bdc2sb':'全角转半角',
'tobdc':'半角转全角'
},
'background':{
'static':{
'lang_background_normal':'背景设置',
'lang_background_local':'在线图片',
'lang_background_set':'选项',
'lang_background_none':'无背景色',
'lang_background_colored':'有背景色',
'lang_background_color':'颜色设置',
'lang_background_netimg':'网络图片',
'lang_background_align':'对齐方式',
'lang_background_position':'精确定位',
'repeatType':{'options':["居中", "横向重复", "纵向重复", "平铺","自定义"]}
},
'noUploadImage':"当前未上传过任何图片!",
'toggleSelect':"单击可切换选中状态\n原图尺寸: "
},
//===============dialog i18N=======================
'insertimage':{
'static':{
'lang_tab_remote':"插入图片", //节点
'lang_tab_upload':"本地上传",
'lang_tab_online':"在线管理",
'lang_tab_search':"图片搜索",
'lang_input_url':"地 址:",
'lang_input_size':"大 小:",
'lang_input_width':"宽度",
'lang_input_height':"高度",
'lang_input_border':"边 框:",
'lang_input_vhspace':"边 距:",
'lang_input_title':"描 述:",
'lang_input_align':'图片浮动方式:',
'lang_imgLoading':" 图片加载中……",
'lang_start_upload':"开始上传",
'lock':{'title':"锁定宽高比例"}, //属性
'searchType':{'title':"图片类型", 'options':["新闻", "壁纸", "表情", "头像"]}, //select的option
'searchTxt':{'value':"请输入搜索关键词"},
'searchBtn':{'value':"百度一下"},
'searchReset':{'value':"清空搜索"},
'noneAlign':{'title':'无浮动'},
'leftAlign':{'title':'左浮动'},
'rightAlign':{'title':'右浮动'},
'centerAlign':{'title':'居中独占一行'}
},
'uploadSelectFile':'点击选择图片',
'uploadAddFile':'继续添加',
'uploadStart':'开始上传',
'uploadPause':'暂停上传',
'uploadContinue':'继续上传',
'uploadRetry':'重试上传',
'uploadDelete':'删除',
'uploadTurnLeft':'向左旋转',
'uploadTurnRight':'向右旋转',
'uploadPreview':'预览中',
'uploadNoPreview':'不能预览',
'updateStatusReady': '选中_张图片,共_KB。',
'updateStatusConfirm': '已成功上传_张照片,_张照片上传失败',
'updateStatusFinish': '共_张(_KB),_张上传成功',
'updateStatusError': ',_张上传失败。',
'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。',
'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!',
'errorExceedSize':'文件大小超出',
'errorFileType':'文件格式不允许',
'errorInterrupt':'文件传输中断',
'errorUploadRetry':'上传失败,请重试',
'errorHttp':'http请求错误',
'errorServerUpload':'服务器返回出错',
'remoteLockError':"宽高不正确,不能所定比例",
'numError':"请输入正确的长度或者宽度值!例如:123,400",
'imageUrlError':"不允许的图片格式或者图片域!",
'imageLoadError':"图片加载失败!请检查链接地址或网络状态!",
'searchRemind':"请输入搜索关键词",
'searchLoading':"图片加载中,请稍后……",
'searchRetry':" :( ,抱歉,没有找到图片!请重试一次!"
},
'attachment':{
'static':{
'lang_tab_upload': '上传附件',
'lang_tab_online': '在线附件',
'lang_start_upload':"开始上传",
'lang_drop_remind':"可以将文件拖到这里,单次最多可选100个文件"
},
'uploadSelectFile':'点击选择文件',
'uploadAddFile':'继续添加',
'uploadStart':'开始上传',
'uploadPause':'暂停上传',
'uploadContinue':'继续上传',
'uploadRetry':'重试上传',
'uploadDelete':'删除',
'uploadTurnLeft':'向左旋转',
'uploadTurnRight':'向右旋转',
'uploadPreview':'预览中',
'updateStatusReady': '选中_个文件,共_KB。',
'updateStatusConfirm': '已成功上传_个文件,_个文件上传失败',
'updateStatusFinish': '共_个(_KB),_个上传成功',
'updateStatusError': ',_张上传失败。',
'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。',
'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!',
'errorExceedSize':'文件大小超出',
'errorFileType':'文件格式不允许',
'errorInterrupt':'文件传输中断',
'errorUploadRetry':'上传失败,请重试',
'errorHttp':'http请求错误',
'errorServerUpload':'服务器返回出错'
},
'insertvideo':{
'static':{
'lang_tab_insertV':"插入视频",
'lang_tab_searchV':"搜索视频",
'lang_tab_uploadV':"上传视频",
'lang_video_url':"视频网址",
'lang_video_size':"视频尺寸",
'lang_videoW':"宽度",
'lang_videoH':"高度",
'lang_alignment':"对齐方式",
'videoSearchTxt':{'value':"请输入搜索关键字!"},
'videoType':{'options':["全部", "热门", "娱乐", "搞笑", "体育", "科技", "综艺"]},
'videoSearchBtn':{'value':"百度一下"},
'videoSearchReset':{'value':"清空结果"},
'lang_input_fileStatus':' 当前未上传文件',
'startUpload':{'style':"background:url(upload.png) no-repeat;"},
'lang_upload_size':"视频尺寸",
'lang_upload_width':"宽度",
'lang_upload_height':"高度",
'lang_upload_alignment':"对齐方式",
'lang_format_advice':"建议使用mp4格式."
},
'numError':"请输入正确的数值,如123,400",
'floatLeft':"左浮动",
'floatRight':"右浮动",
'"default"':"默认",
'block':"独占一行",
'urlError':"输入的视频地址有误,请检查后再试!",
'loading':" &nbsp;视频加载中,请等待……",
'clickToSelect':"点击选中",
'goToSource':'访问源视频',
'noVideo':" &nbsp; &nbsp;抱歉,找不到对应的视频,请重试!",
'browseFiles':'浏览文件',
'uploadSuccess':'上传成功!',
'delSuccessFile':'从成功队列中移除',
'delFailSaveFile':'移除保存失败文件',
'statusPrompt':' 个文件已上传! ',
'flashVersionError':'当前Flash版本过低,请更新FlashPlayer后重试!',
'flashLoadingError':'Flash加载失败!请检查路径或网络状态',
'fileUploadReady':'等待上传……',
'delUploadQueue':'从上传队列中移除',
'limitPrompt1':'单次不能选择超过',
'limitPrompt2':'个文件!请重新选择!',
'delFailFile':'移除失败文件',
'fileSizeLimit':'文件大小超出限制!',
'emptyFile':'空文件无法上传!',
'fileTypeError':'文件类型不允许!',
'unknownError':'未知错误!',
'fileUploading':'上传中,请等待……',
'cancelUpload':'取消上传',
'netError':'网络错误',
'failUpload':'上传失败!',
'serverIOError':'服务器IO错误!',
'noAuthority':'无权限!',
'fileNumLimit':'上传个数限制',
'failCheck':'验证失败,本次上传被跳过!',
'fileCanceling':'取消中,请等待……',
'stopUploading':'上传已停止……',
'uploadSelectFile':'点击选择文件',
'uploadAddFile':'继续添加',
'uploadStart':'开始上传',
'uploadPause':'暂停上传',
'uploadContinue':'继续上传',
'uploadRetry':'重试上传',
'uploadDelete':'删除',
'uploadTurnLeft':'向左旋转',
'uploadTurnRight':'向右旋转',
'uploadPreview':'预览中',
'updateStatusReady': '选中_个文件,共_KB。',
'updateStatusConfirm': '成功上传_个,_个失败',
'updateStatusFinish': '共_个(_KB),_个成功上传',
'updateStatusError': ',_张上传失败。',
'errorNotSupport': 'WebUploader 不支持您的浏览器!如果你使用的是IE浏览器,请尝试升级 flash 播放器。',
'errorLoadConfig': '后端配置项没有正常加载,上传插件不能正常使用!',
'errorExceedSize':'文件大小超出',
'errorFileType':'文件格式不允许',
'errorInterrupt':'文件传输中断',
'errorUploadRetry':'上传失败,请重试',
'errorHttp':'http请求错误',
'errorServerUpload':'服务器返回出错'
},
'webapp':{
'tip1':"本功能由百度APP提供,如看到此页面,请各位站长首先申请百度APPKey!",
'tip2':"申请完成之后请至ueditor.config.js中配置获得的appkey! ",
'applyFor':"点此申请",
'anthorApi':"百度API"
},
'template':{
'static':{
'lang_template_bkcolor':'背景颜色',
'lang_template_clear' : '保留原有内容',
'lang_template_select' : '选择模板'
},
'blank':"空白文档",
'blog':"博客文章",
'resume':"个人简历",
'richText':"图文混排",
'sciPapers':"科技论文"
},
'scrawl':{
'static':{
'lang_input_previousStep':"上一步",
'lang_input_nextsStep':"下一步",
'lang_input_clear':'清空',
'lang_input_addPic':'添加背景',
'lang_input_ScalePic':'缩放背景',
'lang_input_removePic':'删除背景',
'J_imgTxt':{title:'添加背景图片'}
},
'noScarwl':"尚未作画,白纸一张~",
'scrawlUpLoading':"涂鸦上传中,别急哦~",
'continueBtn':"继续",
'imageError':"糟糕,图片读取失败了!",
'backgroundUploading':'背景图片上传中,别急哦~'
},
'music':{
'static':{
'lang_input_tips':"输入歌手/歌曲/专辑,搜索您感兴趣的音乐!",
'J_searchBtn':{value:'搜索歌曲'}
},
'emptyTxt':'未搜索到相关音乐结果,请换一个关键词试试。',
'chapter':'歌曲',
'singer':'歌手',
'special':'专辑',
'listenTest':'试听'
},
'anchor':{
'static':{
'lang_input_anchorName':'锚点名字:'
}
},
'charts':{
'static':{
'lang_data_source':'数据源:',
'lang_chart_format': '图表格式:',
'lang_data_align': '数据对齐方式',
'lang_chart_align_same': '数据源与图表X轴Y轴一致',
'lang_chart_align_reverse': '数据源与图表X轴Y轴相反',
'lang_chart_title': '图表标题',
'lang_chart_main_title': '主标题:',
'lang_chart_sub_title': '子标题:',
'lang_chart_x_title': 'X轴标题:',
'lang_chart_y_title': 'Y轴标题:',
'lang_chart_tip': '提示文字',
'lang_cahrt_tip_prefix': '提示文字前缀:',
'lang_cahrt_tip_description': '仅饼图有效, 当鼠标移动到饼图中相应的块上时,提示框内的文字的前缀',
'lang_chart_data_unit': '数据单位',
'lang_chart_data_unit_title': '单位:',
'lang_chart_data_unit_description': '显示在每个数据点上的数据的单位, 比如: 温度的单位 ℃',
'lang_chart_type': '图表类型:',
'lang_prev_btn': '上一个',
'lang_next_btn': '下一个'
}
},
'emotion':{
'static':{
'lang_input_choice':'精选',
'lang_input_Tuzki':'兔斯基',
'lang_input_BOBO':'BOBO',
'lang_input_lvdouwa':'绿豆蛙',
'lang_input_babyCat':'baby猫',
'lang_input_bubble':'泡泡',
'lang_input_youa':'有啊'
}
},
'gmap':{
'static':{
'lang_input_address':'地址',
'lang_input_search':'搜索',
'address':{value:"北京"}
},
searchError:'无法定位到该地址!'
},
'help':{
'static':{
'lang_input_about':'关于UEditor',
'lang_input_shortcuts':'快捷键',
'lang_input_introduction':'UEditor是由百度web前端研发部开发的所见即所得富文本web编辑器,具有轻量,可定制,注重用户体验等特点。开源基于BSD协议,允许自由使用和修改代码。',
'lang_Txt_shortcuts':'快捷键',
'lang_Txt_func':'功能',
'lang_Txt_bold':'给选中字设置为加粗',
'lang_Txt_copy':'复制选中内容',
'lang_Txt_cut':'剪切选中内容',
'lang_Txt_Paste':'粘贴',
'lang_Txt_undo':'重新执行上次操作',
'lang_Txt_redo':'撤销上一次操作',
'lang_Txt_italic':'给选中字设置为斜体',
'lang_Txt_underline':'给选中字加下划线',
'lang_Txt_selectAll':'全部选中',
'lang_Txt_visualEnter':'软回车',
'lang_Txt_fullscreen':'全屏'
}
},
'insertframe':{
'static':{
'lang_input_address':'地址:',
'lang_input_width':'宽度:',
'lang_input_height':'高度:',
'lang_input_isScroll':'允许滚动条:',
'lang_input_frameborder':'显示框架边框:',
'lang_input_alignMode':'对齐方式:',
'align':{title:"对齐方式", options:["默认", "左对齐", "右对齐", "居中"]}
},
'enterAddress':'请输入地址!'
},
'link':{
'static':{
'lang_input_text':'文本内容:',
'lang_input_url':'链接地址:',
'lang_input_title':'标题:',
'lang_input_target':'是否在新窗口打开:'
},
'validLink':'只支持选中一个链接时生效',
'httpPrompt':'您输入的超链接中不包含http等协议名称,默认将为您添加http://前缀'
},
'map':{
'static':{
lang_city:"城市",
lang_address:"地址",
city:{value:"北京"},
lang_search:"搜索",
lang_dynamicmap:"插入动态地图"
},
cityMsg:"请选择城市",
errorMsg:"抱歉,找不到该位置!"
},
'searchreplace':{
'static':{
lang_tab_search:"查找",
lang_tab_replace:"替换",
lang_search1:"查找",
lang_search2:"查找",
lang_replace:"替换",
lang_searchReg:'支持正则表达式,添加前后斜杠标示为正则表达式,例如“/表达式/”',
lang_searchReg1:'支持正则表达式,添加前后斜杠标示为正则表达式,例如“/表达式/”',
lang_case_sensitive1:"区分大小写",
lang_case_sensitive2:"区分大小写",
nextFindBtn:{value:"下一个"},
preFindBtn:{value:"上一个"},
nextReplaceBtn:{value:"下一个"},
preReplaceBtn:{value:"上一个"},
repalceBtn:{value:"替换"},
repalceAllBtn:{value:"全部替换"}
},
getEnd:"已经搜索到文章末尾!",
getStart:"已经搜索到文章头部",
countMsg:"总共替换了{#count}处!"
},
'snapscreen':{
'static':{
lang_showMsg:"截图功能需要首先安装UEditor截图插件! ",
lang_download:"点此下载",
lang_step1:"第一步,下载UEditor截图插件并运行安装。",
lang_step2:"第二步,插件安装完成后即可使用,如不生效,请重启浏览器后再试!"
}
},
'spechars':{
'static':{},
tsfh:"特殊字符",
lmsz:"罗马字符",
szfh:"数学字符",
rwfh:"日文字符",
xlzm:"希腊字母",
ewzm:"俄文字符",
pyzm:"拼音字母",
yyyb:"英语音标",
zyzf:"其他"
},
'edittable':{
'static':{
'lang_tableStyle':'表格样式',
'lang_insertCaption':'添加表格名称行',
'lang_insertTitle':'添加表格标题行',
'lang_insertTitleCol':'添加表格标题列',
'lang_orderbycontent':"使表格内容可排序",
'lang_tableSize':'自动调整表格尺寸',
'lang_autoSizeContent':'按表格文字自适应',
'lang_autoSizePage':'按页面宽度自适应',
'lang_example':'示例',
'lang_borderStyle':'表格边框',
'lang_color':'颜色:'
},
captionName:'表格名称',
titleName:'标题',
cellsName:'内容',
errorMsg:'有合并单元格,不可排序'
},
'edittip':{
'static':{
lang_delRow:'删除整行',
lang_delCol:'删除整列'
}
},
'edittd':{
'static':{
lang_tdBkColor:'背景颜色:'
}
},
'formula':{
'static':{
}
},
'wordimage':{
'static':{
lang_resave:"转存步骤",
uploadBtn:{src:"upload.png",alt:"上传"},
clipboard:{style:"background: url(copy.png) -153px -1px no-repeat;"},
lang_step:"1、点击顶部复制按钮,将地址复制到剪贴板;2、点击添加照片按钮,在弹出的对话框中使用Ctrl+V粘贴地址;3、点击打开后选择图片上传流程。"
},
'fileType':"图片",
'flashError':"FLASH初始化失败,请检查FLASH插件是否正确安装!",
'netError':"网络连接错误,请重试!",
'copySuccess':"图片地址已经复制!",
'flashI18n':{} //留空默认中文
},
'autosave': {
'saving':'保存中...',
'success':'本地保存成功'
}
};
/*基础UI构建
*/
/* common layer */
.edui-default .edui-box {
border: none;
padding: 0;
margin: 0;
overflow: hidden;
}
.edui-default a.edui-box {
display: block;
text-decoration: none;
color: black;
}
.edui-default a.edui-box:hover {
text-decoration: none;
}
.edui-default a.edui-box:active {
text-decoration: none;
}
.edui-default table.edui-box {
border-collapse: collapse;
}
.edui-default ul.edui-box {
list-style-type: none;
}
div.edui-box {
position: relative;
display: -moz-inline-box !important;
display: inline-block !important;
vertical-align: top;
}
.edui-default .edui-clearfix {
zoom: 1
}
.edui-default .edui-clearfix:after {
content: '\20';
display: block;
clear: both;
}
* html div.edui-box {
display: inline !important;
}
*:first-child+html div.edui-box {
display: inline !important;
}
/* control layout */
.edui-default .edui-button-body, .edui-splitbutton-body, .edui-menubutton-body, .edui-combox-body {
position: relative;
}
.edui-default .edui-popup {
position: absolute;
-webkit-user-select: none;
-moz-user-select: none;
}
.edui-default .edui-popup .edui-shadow {
position: absolute;
z-index: -1;
}
.edui-default .edui-popup .edui-bordereraser {
position: absolute;
overflow: hidden;
}
.edui-default .edui-tablepicker .edui-canvas {
position: relative;
}
.edui-default .edui-tablepicker .edui-canvas .edui-overlay {
position: absolute;
}
.edui-default .edui-dialog-modalmask, .edui-dialog-dragmask {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.edui-default .edui-toolbar {
position: relative;
}
/*
* default theme
*/
.edui-default .edui-label {
cursor: default;
}
.edui-default span.edui-clickable {
color: blue;
cursor: pointer;
text-decoration: underline;
}
.edui-default span.edui-unclickable {
color: gray;
cursor: default;
}
/* 工具栏 */
.edui-default .edui-toolbar {
cursor: default;
-webkit-user-select: none;
-moz-user-select: none;
padding: 1px;
overflow: hidden; /*全屏下单独一行不占位*/
zoom: 1;
width:auto;
height:auto;
}
.edui-default .edui-toolbar .edui-button,
.edui-default .edui-toolbar .edui-splitbutton,
.edui-default .edui-toolbar .edui-menubutton,
.edui-default .edui-toolbar .edui-combox {
margin: 1px;
}
/*UI工具栏、编辑区域、底部*/
.edui-default .edui-editor {
border: 1px solid #d4d4d4;
background-color: white;
position: relative;
overflow: visible;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.edui-editor div{
width:auto;
height:auto;
}
.edui-default .edui-editor-toolbarbox {
position: relative;
zoom: 1;
-webkit-box-shadow:0 1px 4px rgba(204, 204, 204, 0.6);
-moz-box-shadow:0 1px 4px rgba(204, 204, 204, 0.6);
box-shadow:0 1px 4px rgba(204, 204, 204, 0.6);
border-top-left-radius:2px;
border-top-right-radius:2px;
}
.edui-default .edui-editor-toolbarboxouter {
border-bottom: 1px solid #d4d4d4;
background-color: #fafafa;
background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
background-repeat: repeat-x;
/*border: 1px solid #d4d4d4;*/
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
*zoom: 1;
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
}
.edui-default .edui-editor-toolbarboxinner {
padding: 2px;
}
.edui-default .edui-editor-iframeholder {
position: relative;
/*for fix ie6 toolbarmsg under iframe bug. relative -> static */
/*_position: static !important;*
}
.edui-default .edui-editor-iframeholder textarea {
font-family: consolas, "Courier New", "lucida console", monospace;
font-size: 12px;
line-height: 18px;
}
.edui-default .edui-editor-bottombar {
/*border-top: 1px solid #ccc;*/
/*height: 20px;*/
/*width: 40%;*/
/*float: left;*/
/*overflow: hidden;*/
}
.edui-default .edui-editor-bottomContainer {
overflow: hidden;
}
.edui-default .edui-editor-bottomContainer table {
width: 100%;
height: 0;
overflow: hidden;
border-spacing: 0;
}
.edui-default .edui-editor-bottomContainer td {
white-space: nowrap;
border-top: 1px solid #ccc;
line-height: 20px;
font-size: 12px;
font-family: Arial, Helvetica, Tahoma, Verdana, Sans-Serif;
}
.edui-default .edui-editor-wordcount {
text-align: right;
margin-right: 5px;
color: #aaa;
}
.edui-default .edui-editor-scale {
width: 12px;
}
.edui-default .edui-editor-scale .edui-editor-icon {
float: right;
width: 100%;
height: 12px;
margin-top: 10px;
background: url(../images/scale.png) no-repeat;
cursor: se-resize;
}
.edui-default .edui-editor-breadcrumb {
margin: 2px 0 0 3px;
}
.edui-default .edui-editor-breadcrumb span {
cursor: pointer;
text-decoration: underline;
color: blue;
}
.edui-default .edui-toolbar .edui-for-fullscreen {
float: right;
}
.edui-default .edui-bubble .edui-popup-content {
border: 1px solid #DCAC6C;
background-color: #fff6d9;
padding: 5px;
font-size: 10pt;
font-family: "宋体";
}
.edui-default .edui-bubble .edui-shadow {
/*box-shadow: 1px 1px 3px #818181;*/
/*-webkit-box-shadow: 2px 2px 3px #818181;*/
/*-moz-box-shadow: 2px 2px 3px #818181;*/
/*filter: progid:DXImageTransform.Microsoft.Blur(PixelRadius = '2', MakeShadow = 'true', ShadowOpacity = '0.5');*/
}
.edui-default .edui-editor-toolbarmsg {
background-color: #FFF6D9;
border-bottom: 1px solid #ccc;
position: absolute;
bottom: -25px;
left: 0;
z-index: 1009;
width: 99.9%;
}
.edui-default .edui-editor-toolbarmsg-upload {
font-size: 14px;
color: blue;
width: 100px;
height: 16px;
line-height: 16px;
cursor: pointer;
position: absolute;
top: 5px;
left: 350px;
}
.edui-default .edui-editor-toolbarmsg-label {
font-size: 12px;
line-height: 16px;
padding: 4px;
}
.edui-default .edui-editor-toolbarmsg-close {
float: right;
width: 20px;
height: 16px;
line-height: 16px;
cursor: pointer;
color: red;
}
/*可选中菜单按钮*/
.edui-default .edui-list .edui-bordereraser {
display: none;
}
.edui-default .edui-listitem {
padding: 1px;
white-space: nowrap;
}
.edui-default .edui-list .edui-state-hover {
position: relative;
background-color: #fff5d4;
border: 1px solid #dcac6c;
padding: 0;
}
.edui-default .edui-for-fontfamily .edui-listitem-label {
min-width: 130px;
_width: 120px;
font-size: 12px;
height: 22px;
line-height: 22px;
padding-left: 5px;
}
.edui-default .edui-for-insertcode .edui-listitem-label {
min-width: 120px;
_width: 120px;
font-size: 12px;
height: 22px;
line-height: 22px;
padding-left: 5px;
}
.edui-default .edui-for-underline .edui-listitem-label {
min-width: 120px;
_width: 120px;
padding: 3px 5px;
font-size: 12px;
}
.edui-default .edui-for-fontsize .edui-listitem-label {
min-width: 120px;
_width: 120px;
padding: 3px 5px;
}
.edui-default .edui-for-paragraph .edui-listitem-label {
min-width: 200px;
_width: 200px;
padding: 2px 5px;
}
.edui-default .edui-for-rowspacingtop .edui-listitem-label,
.edui-default .edui-for-rowspacingbottom .edui-listitem-label {
min-width: 53px;
_width: 53px;
padding: 2px 5px;
}
.edui-default .edui-for-lineheight .edui-listitem-label {
min-width: 53px;
_width: 53px;
padding: 2px 5px;
}
.edui-default .edui-for-customstyle .edui-listitem-label {
min-width: 200px;
_width: 200px;
width: 200px !important;
padding: 2px 5px;
}
/* 可选中按钮弹出菜单*/
.edui-default .edui-menu {
z-index: 3000;
}
.edui-default .edui-menu .edui-popup-content {
padding: 3px;
}
.edui-default .edui-menu-body {
_width: 150px;
min-width: 170px;
background: url("../images/sparator_v.png") repeat-y 25px;
}
.edui-default .edui-menuitem-body {
}
.edui-default .edui-menuitem {
height: 20px;
cursor: default;
vertical-align: top;
}
.edui-default .edui-menuitem .edui-icon {
width: 20px !important;
height: 20px !important;
background: url(../images/icons.png) 0 -4000px;
background: url(../images/icons.gif) 0 -4000px\9;
}
.edui-default .edui-menuitem .edui-label {
font-size: 12px;
line-height: 20px;
height: 20px;
padding-left: 10px;
}
.edui-default .edui-state-checked .edui-menuitem-body {
background: url("../images/icons-all.gif") no-repeat 6px -205px;
}
.edui-default .edui-state-disabled .edui-menuitem-label {
color: gray;
}
/*不可选中菜单按钮 */
.edui-default .edui-toolbar .edui-combox-body .edui-button-body {
width: 60px;
font-size: 12px;
height: 20px;
line-height: 20px;
padding-left: 5px;
white-space: nowrap;
margin: 0 3px 0 0;
}
.edui-default .edui-toolbar .edui-combox-body .edui-arrow {
background: url(../images/icons.png) -741px 0;
_background: url(../images/icons.gif) -741px 0;
height: 20px;
width: 9px;
}
.edui-default .edui-toolbar .edui-combox .edui-combox-body {
border: 1px solid #CCC;
background-color: white;
border-radius: 2px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
}
.edui-default .edui-toolbar .edui-combox-body .edui-splitborder {
display: none;
}
.edui-default .edui-toolbar .edui-combox-body .edui-arrow {
border-left: 1px solid #CCC;
}
.edui-default .edui-toolbar .edui-state-hover .edui-combox-body {
background-color: #fff5d4;
border: 1px solid #dcac6c;
}
.edui-default .edui-toolbar .edui-state-hover .edui-combox-body .edui-arrow {
border-left: 1px solid #dcac6c;
}
.edui-default .edui-toolbar .edui-state-checked .edui-combox-body {
background-color: #FFE69F;
border: 1px solid #DCAC6C;
}
.edui-toolbar .edui-state-checked .edui-combox-body .edui-arrow {
border-left: 1px solid #DCAC6C;
}
.edui-toolbar .edui-state-disabled .edui-combox-body {
background-color: #F0F0EE;
opacity: 0.3;
filter: alpha(opacity = 30);
}
.edui-toolbar .edui-state-opened .edui-combox-body {
background-color: white;
border: 1px solid gray;
}
/*普通按钮样式及状态*/
.edui-default .edui-toolbar .edui-button .edui-icon,
.edui-default .edui-toolbar .edui-menubutton .edui-icon,
.edui-default .edui-toolbar .edui-splitbutton .edui-icon {
height: 20px !important;
width: 20px !important;
background-image: url(../images/icons.png);
background-image: url(../images/icons.gif) \9;
}
.edui-default .edui-toolbar .edui-button .edui-button-wrap {
padding: 1px;
position: relative;
}
.edui-default .edui-toolbar .edui-button .edui-state-hover .edui-button-wrap {
background-color: #fff5d4;
padding: 0;
border: 1px solid #dcac6c;
}
.edui-default .edui-toolbar .edui-button .edui-state-checked .edui-button-wrap {
background-color: #ffe69f;
padding: 0;
border: 1px solid #dcac6c;
border-radius: 2px;
-webkit-border-radius: 2px;
-moz-border-radius: 2px;
}
.edui-default .edui-toolbar .edui-button .edui-state-active .edui-button-wrap {
background-color: #ffffff;
padding: 0;
border: 1px solid gray;
}
.edui-default .edui-toolbar .edui-state-disabled .edui-label {
color: #ccc;
}
.edui-default .edui-toolbar .edui-state-disabled .edui-icon {
opacity: 0.3;
filter: alpha(opacity = 30);
}
/* toolbar icons */
.edui-default .edui-for-undo .edui-icon {
background-position: -160px 0;
}
.edui-default .edui-for-redo .edui-icon {
background-position: -100px 0;
}
.edui-default .edui-for-bold .edui-icon {
background-position: 0 0;
}
.edui-default .edui-for-italic .edui-icon {
background-position: -60px 0;
}
.edui-default .edui-for-fontborder .edui-icon {
background-position:-160px -40px;
}
.edui-default .edui-for-underline .edui-icon {
background-position: -140px 0;
}
.edui-default .edui-for-strikethrough .edui-icon {
background-position: -120px 0;
}
.edui-default .edui-for-subscript .edui-icon {
background-position: -600px 0;
}
.edui-default .edui-for-superscript .edui-icon {
background-position: -620px 0;
}
.edui-default .edui-for-blockquote .edui-icon {
background-position: -220px 0;
}
.edui-default .edui-for-forecolor .edui-icon {
background-position: -720px 0;
}
.edui-default .edui-for-backcolor .edui-icon {
background-position: -760px 0;
}
.edui-default .edui-for-inserttable .edui-icon {
background-position: -580px -20px;
}
.edui-default .edui-for-autotypeset .edui-icon {
background-position: -640px -40px;
}
.edui-default .edui-for-justifyleft .edui-icon {
background-position: -460px 0;
}
.edui-default .edui-for-justifycenter .edui-icon {
background-position: -420px 0;
}
.edui-default .edui-for-justifyright .edui-icon {
background-position: -480px 0;
}
.edui-default .edui-for-justifyjustify .edui-icon {
background-position: -440px 0;
}
.edui-default .edui-for-insertorderedlist .edui-icon {
background-position: -80px 0;
}
.edui-default .edui-for-insertunorderedlist .edui-icon {
background-position: -20px 0;
}
.edui-default .edui-for-lineheight .edui-icon {
background-position: -725px -40px;
}
.edui-default .edui-for-rowspacingbottom .edui-icon {
background-position: -745px -40px;
}
.edui-default .edui-for-rowspacingtop .edui-icon {
background-position: -765px -40px;
}
.edui-default .edui-for-horizontal .edui-icon {
background-position: -360px 0;
}
.edui-default .edui-for-link .edui-icon {
background-position: -500px 0;
}
.edui-default .edui-for-code .edui-icon {
background-position: -440px -40px;
}
.edui-default .edui-for-insertimage .edui-icon {
background-position: -726px -77px;
}
.edui-default .edui-for-insertframe .edui-icon {
background-position: -240px -40px;
}
.edui-default .edui-for-emoticon .edui-icon {
background-position: -60px -20px;
}
.edui-default .edui-for-spechars .edui-icon {
background-position: -240px 0;
}
.edui-default .edui-for-help .edui-icon {
background-position: -340px 0;
}
.edui-default .edui-for-print .edui-icon {
background-position: -440px -20px;
}
.edui-default .edui-for-preview .edui-icon {
background-position: -420px -20px;
}
.edui-default .edui-for-selectall .edui-icon {
background-position: -400px -20px;
}
.edui-default .edui-for-searchreplace .edui-icon {
background-position: -520px -20px;
}
.edui-default .edui-for-map .edui-icon {
background-position: -40px -40px;
}
.edui-default .edui-for-gmap .edui-icon {
background-position: -260px -40px;
}
.edui-default .edui-for-insertvideo .edui-icon {
background-position: -320px -20px;
}
.edui-default .edui-for-time .edui-icon {
background-position: -160px -20px;
}
.edui-default .edui-for-date .edui-icon {
background-position: -140px -20px;
}
.edui-default .edui-for-cut .edui-icon {
background-position: -680px 0;
}
.edui-default .edui-for-copy .edui-icon {
background-position: -700px 0;
}
.edui-default .edui-for-paste .edui-icon {
background-position: -560px 0;
}
.edui-default .edui-for-formatmatch .edui-icon {
background-position: -40px 0;
}
.edui-default .edui-for-pasteplain .edui-icon {
background-position: -360px -20px;
}
.edui-default .edui-for-directionalityltr .edui-icon {
background-position: -20px -20px;
}
.edui-default .edui-for-directionalityrtl .edui-icon {
background-position: -40px -20px;
}
.edui-default .edui-for-source .edui-icon {
background-position: -261px -0px;
}
.edui-default .edui-for-removeformat .edui-icon {
background-position: -580px 0;
}
.edui-default .edui-for-unlink .edui-icon {
background-position: -640px 0;
}
.edui-default .edui-for-touppercase .edui-icon {
background-position: -786px 0;
}
.edui-default .edui-for-tolowercase .edui-icon {
background-position: -806px 0;
}
.edui-default .edui-for-insertrow .edui-icon {
background-position: -478px -76px;
}
.edui-default .edui-for-insertrownext .edui-icon {
background-position: -498px -76px;
}
.edui-default .edui-for-insertcol .edui-icon {
background-position: -455px -76px;
}
.edui-default .edui-for-insertcolnext .edui-icon {
background-position: -429px -76px;
}
.edui-default .edui-for-mergeright .edui-icon {
background-position: -60px -40px;
}
.edui-default .edui-for-mergedown .edui-icon {
background-position: -80px -40px;
}
.edui-default .edui-for-splittorows .edui-icon {
background-position: -100px -40px;
}
.edui-default .edui-for-splittocols .edui-icon {
background-position: -120px -40px;
}
.edui-default .edui-for-insertparagraphbeforetable .edui-icon {
background-position: -140px -40px;
}
.edui-default .edui-for-deleterow .edui-icon {
background-position: -660px -20px;
}
.edui-default .edui-for-deletecol .edui-icon {
background-position: -640px -20px;
}
.edui-default .edui-for-splittocells .edui-icon {
background-position: -800px -20px;
}
.edui-default .edui-for-mergecells .edui-icon {
background-position: -760px -20px;
}
.edui-default .edui-for-deletetable .edui-icon {
background-position: -620px -20px;
}
.edui-default .edui-for-cleardoc .edui-icon {
background-position: -520px 0;
}
.edui-default .edui-for-fullscreen .edui-icon {
background-position: -100px -20px;
}
.edui-default .edui-for-anchor .edui-icon {
background-position: -200px 0;
}
.edui-default .edui-for-pagebreak .edui-icon {
background-position: -460px -40px;
}
.edui-default .edui-for-imagenone .edui-icon {
background-position: -480px -40px;
}
.edui-default .edui-for-imageleft .edui-icon {
background-position: -500px -40px;
}
.edui-default .edui-for-wordimage .edui-icon {
background-position: -660px -40px;
}
.edui-default .edui-for-imageright .edui-icon {
background-position: -520px -40px;
}
.edui-default .edui-for-imagecenter .edui-icon {
background-position: -540px -40px;
}
.edui-default .edui-for-indent .edui-icon {
background-position: -400px 0;
}
.edui-default .edui-for-outdent .edui-icon {
background-position: -540px 0;
}
.edui-default .edui-for-webapp .edui-icon {
background-position: -601px -40px
}
.edui-default .edui-for-table .edui-icon {
background-position: -580px -20px;
}
.edui-default .edui-for-edittable .edui-icon {
background-position: -420px -40px;
}
.edui-default .edui-for-template .edui-icon {
background-position: -339px -40px;
}
.edui-default .edui-for-delete .edui-icon {
background-position: -360px -40px;
}
.edui-default .edui-for-attachment .edui-icon {
background-position: -620px -40px;
}
.edui-default .edui-for-edittd .edui-icon {
background-position: -700px -40px;
}
.edui-default .edui-for-snapscreen .edui-icon {
background-position: -581px -40px
}
.edui-default .edui-for-scrawl .edui-icon {
background-position: -801px -41px
}
.edui-default .edui-for-background .edui-icon {
background-position: -680px -40px;
}
.edui-default .edui-for-music .edui-icon {
background-position: -18px -40px
}
.edui-default .edui-for-formula .edui-icon {
background-position: -200px -40px
}
.edui-default .edui-for-aligntd .edui-icon {
background-position: -236px -76px;
}
.edui-default .edui-for-insertparagraphtrue .edui-icon {
background-position: -625px -76px;
}
.edui-default .edui-for-insertparagraph .edui-icon {
background-position: -602px -76px;
}
.edui-default .edui-for-insertcaption .edui-icon {
background-position: -336px -76px;
}
.edui-default .edui-for-deletecaption .edui-icon {
background-position: -362px -76px;
}
.edui-default .edui-for-inserttitle .edui-icon {
background-position: -286px -76px;
}
.edui-default .edui-for-deletetitle .edui-icon {
background-position: -311px -76px;
}
.edui-default .edui-for-aligntable .edui-icon {
background-position: -440px 0;
}
.edui-default .edui-for-tablealignment-left .edui-icon {
background-position: -460px 0;
}
.edui-default .edui-for-tablealignment-center .edui-icon {
background-position: -420px 0;
}
.edui-default .edui-for-tablealignment-right .edui-icon {
background-position: -480px 0;
}
.edui-default .edui-for-drafts .edui-icon {
background-position: -560px 0;
}
.edui-default .edui-for-charts .edui-icon {
background: url( ../images/charts.png ) no-repeat 2px 3px!important;
}
.edui-default .edui-for-inserttitlecol .edui-icon {
background-position: -673px -76px;
}
.edui-default .edui-for-deletetitlecol .edui-icon {
background-position: -698px -76px;
}
.edui-default .edui-for-simpleupload .edui-icon {
background-position: -380px 0px;
}
/*splitbutton*/
.edui-default .edui-toolbar .edui-splitbutton-body .edui-arrow,
.edui-default .edui-toolbar .edui-menubutton-body .edui-arrow {
background: url(../images/icons.png) -741px 0;
_background: url(../images/icons.gif) -741px 0;
height: 20px;
width: 9px;
}
.edui-default .edui-toolbar .edui-splitbutton .edui-splitbutton-body,
.edui-default .edui-toolbar .edui-menubutton .edui-menubutton-body {
padding: 1px;
}
.edui-default .edui-toolbar .edui-splitborder {
width: 1px;
height: 20px;
}
.edui-default .edui-toolbar .edui-state-hover .edui-splitborder {
width: 1px;
border-left: 0px solid #dcac6c;
}
.edui-default .edui-toolbar .edui-state-active .edui-splitborder {
width: 0;
border-left: 1px solid gray;
}
.edui-default .edui-toolbar .edui-state-opened .edui-splitborder {
width: 1px;
border: 0;
}
.edui-default .edui-toolbar .edui-splitbutton .edui-state-hover .edui-splitbutton-body,
.edui-default .edui-toolbar .edui-menubutton .edui-state-hover .edui-menubutton-body {
background-color: #fff5d4;
border: 1px solid #dcac6c;
padding: 0;
}
.edui-default .edui-toolbar .edui-splitbutton .edui-state-checked .edui-splitbutton-body,
.edui-default .edui-toolbar .edui-menubutton .edui-state-checked .edui-menubutton-body {
background-color: #FFE69F;
border: 1px solid #DCAC6C;
padding: 0;
}
.edui-default .edui-toolbar .edui-splitbutton .edui-state-active .edui-splitbutton-body,
.edui-default .edui-toolbar .edui-menubutton .edui-state-active .edui-menubutton-body {
background-color: #ffffff;
border: 1px solid gray;
padding: 0;
}
.edui-default .edui-state-disabled .edui-arrow {
opacity: 0.3;
_filter: alpha(opacity = 30);
}
.edui-default .edui-toolbar .edui-splitbutton .edui-state-opened .edui-splitbutton-body,
.edui-default .edui-toolbar .edui-menubutton .edui-state-opened .edui-menubutton-body {
background-color: white;
border: 1px solid gray;
padding: 0;
}
.edui-default .edui-for-insertorderedlist .edui-bordereraser,
.edui-default .edui-for-lineheight .edui-bordereraser,
.edui-default .edui-for-rowspacingtop .edui-bordereraser,
.edui-default .edui-for-rowspacingbottom .edui-bordereraser,
.edui-default .edui-for-insertunorderedlist .edui-bordereraser {
background-color: white;
}
/* 解决嵌套导致的图标问题 */
.edui-default .edui-for-insertorderedlist .edui-popup-body .edui-icon,
.edui-default .edui-for-lineheight .edui-popup-body .edui-icon,
.edui-default .edui-for-rowspacingtop .edui-popup-body .edui-icon,
.edui-default .edui-for-rowspacingbottom .edui-popup-body .edui-icon,
.edui-default .edui-for-insertunorderedlist .edui-popup-body .edui-icon {
/*background-position: 0 -40px;*/
background-image: none ;
}
/* 弹出菜单 */
.edui-default .edui-popup {
z-index: 3000;
background-color: #ffffff;
width:auto;
height:auto;
}
.edui-default .edui-popup .edui-shadow {
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.edui-default .edui-popup-content {
border:1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
*border-right-width: 2px;
*border-bottom-width: 2px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 3px 4px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 3px 4px rgba(0, 0, 0, 0.2);
box-shadow: 0 3px 4px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
padding: 5px;
background:#ffffff;
}
.edui-default .edui-popup .edui-bordereraser {
background-color: white;
height: 3px;
}
.edui-default .edui-menu .edui-bordereraser {
height: 3px;
}
.edui-default .edui-anchor-topleft .edui-bordereraser {
left: 1px;
top: -2px;
}
.edui-default .edui-anchor-topright .edui-bordereraser {
right: 1px;
top: -2px;
}
.edui-default .edui-anchor-bottomleft .edui-bordereraser {
left: 0;
bottom: -6px;
height: 7px;
border-left: 1px solid gray;
border-right: 1px solid gray;
}
.edui-default .edui-anchor-bottomright .edui-bordereraser {
right: 0;
bottom: -6px;
height: 7px;
border-left: 1px solid gray;
border-right: 1px solid gray;
}
.edui-popup div{
width:auto;
height:auto;
}
.edui-default .edui-editor-messageholder {
display: block;
width: 150px;
height: auto;
border: 0;
margin: 0;
padding: 0;
position: absolute;
top: 28px;
right: 3px;
}
.edui-default .edui-message{
min-height: 10px;
text-shadow: 0 1px 0 rgba(255,255,255,0.5);
padding: 0;
margin-bottom: 3px;
position: relative;
}
.edui-default .edui-message-body{
border-radius: 3px;
padding: 8px 15px 8px 8px;
color: #c09853;
background-color: #fcf8e3;
border: 1px solid #fbeed5;
}
.edui-default .edui-message-type-info{
color: #3a87ad;
background-color: #d9edf7;
border-color: #bce8f1
}
.edui-default .edui-message-type-success{
color: #468847;
background-color: #dff0d8;
border-color: #d6e9c6
}
.edui-default .edui-message-type-danger,
.edui-default .edui-message-type-error{
color: #b94a48;
background-color: #f2dede;
border-color: #eed3d7
}
.edui-default .edui-message .edui-message-closer {
display: block;
width: 16px;
height: 16px;
line-height: 16px;
position: absolute;
top: 0;
right: 0;
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
float: right;
font-size: 20px;
font-weight: bold;
color: #999;
text-shadow: 0 1px 0 #fff;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
}
.edui-default .edui-message .edui-message-content {
font-size: 10pt;
word-wrap: break-word;
word-break: normal;
}
/* 弹出对话框按钮和对话框大小 */
.edui-default .edui-dialog {
z-index: 2000;
position: absolute;
}
.edui-dialog div{
width:auto;
}
.edui-default .edui-dialog-wrap {
margin-right: 6px;
margin-bottom: 6px;
}
.edui-default .edui-dialog-fullscreen-flag {
margin-right: 0;
margin-bottom: 0;
}
.edui-default .edui-dialog-body {
position: relative;
padding:2px 0 0 2px;
_zoom: 1;
}
.edui-default .edui-dialog-fullscreen-flag .edui-dialog-body {
padding: 0;
}
.edui-default .edui-dialog-shadow {
position: absolute;
z-index: -1;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: #ffffff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
*border-right-width: 2px;
*border-bottom-width: 2px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
.edui-default .edui-dialog-foot {
background-color: white;
}
.edui-default .edui-dialog-titlebar {
height: 26px;
border-bottom: 1px solid #c6c6c6;
background: url(../images/dialog-title-bg.png) repeat-x bottom;
position: relative;
cursor: move;
}
.edui-default .edui-dialog-caption {
font-weight: bold;
font-size: 12px;
line-height: 26px;
padding-left: 5px;
}
.edui-default .edui-dialog-draghandle {
height: 26px;
}
.edui-default .edui-dialog-closebutton {
position: absolute !important;
right: 5px;
top: 3px;
}
.edui-default .edui-dialog-closebutton .edui-button-body {
height: 20px;
width: 20px;
cursor: pointer;
background: url("../images/icons-all.gif") no-repeat 0 -59px;
}
.edui-default .edui-dialog-closebutton .edui-state-hover .edui-button-body {
background: url("../images/icons-all.gif") no-repeat 0 -89px;
}
.edui-default .edui-dialog-foot {
height: 40px;
}
.edui-default .edui-dialog-buttons {
position: absolute;
right: 0;
}
.edui-default .edui-dialog-buttons .edui-button {
margin-right: 10px;
}
.edui-default .edui-dialog-buttons .edui-button .edui-button-body {
background: url("../images/icons-all.gif") no-repeat;
height: 24px;
width: 96px;
font-size: 12px;
line-height: 24px;
text-align: center;
cursor: default;
}
.edui-default .edui-dialog-buttons .edui-button .edui-state-hover .edui-button-body {
background: url("../images/icons-all.gif") no-repeat 0 -30px;
}
.edui-default .edui-dialog iframe {
border: 0;
padding: 0;
margin: 0;
vertical-align: top;
}
.edui-default .edui-dialog-modalmask {
opacity: 0.3;
filter: alpha(opacity = 30);
background-color: #ccc;
position: absolute;
/*z-index: 1999;*/
}
.edui-default .edui-dialog-dragmask {
position: absolute;
/*z-index: 2001;*/
background-color: transparent;
cursor: move;
}
.edui-default .edui-dialog-content {
position: relative;
}
.edui-default .dialogcontmask {
cursor: move;
visibility: hidden;
display: block;
position: absolute;
width: 100%;
height: 100%;
opacity: 0;
filter: alpha(opacity = 0);
}
/*link-dialog*/
.edui-default .edui-for-link .edui-dialog-content {
width: 420px;
height: 200px;
overflow: hidden;
}
/*background-dialog*/
.edui-default .edui-for-background .edui-dialog-content {
width: 440px;
height: 280px;
overflow: hidden;
}
/*template-dialog*/
.edui-default .edui-for-template .edui-dialog-content {
width: 630px;
height: 390px;
overflow: hidden;
}
/*scrawl-dialog*/
.edui-default .edui-for-scrawl .edui-dialog-content {
width: 515px;
*width: 506px;
height: 360px;
}
/*spechars-dialog*/
.edui-default .edui-for-spechars .edui-dialog-content {
width: 620px;
height: 500px;
*width: 630px;
*height: 570px;
}
/*image-dialog*/
.edui-default .edui-for-insertimage .edui-dialog-content {
width: 650px;
height: 400px;
overflow: hidden;
}
/*webapp-dialog*/
.edui-default .edui-for-webapp .edui-dialog-content {
width: 560px;
_width: 565px;
height: 450px;
overflow: hidden;
}
/*image-insertframe*/
.edui-default .edui-for-insertframe .edui-dialog-content {
width: 350px;
height: 200px;
overflow: hidden;
}
/*wordImage-dialog*/
.edui-default .edui-for-wordimage .edui-dialog-content {
width: 620px;
height: 380px;
overflow: hidden;
}
/*attachment-dialog*/
.edui-default .edui-for-attachment .edui-dialog-content {
width: 650px;
height: 400px;
overflow: hidden;
}
/*map-dialog*/
.edui-default .edui-for-map .edui-dialog-content {
width: 550px;
height: 400px;
}
/*gmap-dialog*/
.edui-default .edui-for-gmap .edui-dialog-content {
width: 550px;
height: 400px;
}
/*video-dialog*/
.edui-default .edui-for-insertvideo .edui-dialog-content {
width: 590px;
height: 390px;
}
/*anchor-dialog*/
.edui-default .edui-for-anchor .edui-dialog-content {
width: 320px;
height: 60px;
overflow: hidden;
}
/*searchreplace-dialog*/
.edui-default .edui-for-searchreplace .edui-dialog-content {
width: 400px;
height: 220px;
}
/*help-dialog*/
.edui-default .edui-for-help .edui-dialog-content {
width: 400px;
height: 420px;
}
/*edittable-dialog*/
.edui-default .edui-for-edittable .edui-dialog-content {
width: 540px;
_width:590px;
height: 335px;
}
/*edittip-dialog*/
.edui-default .edui-for-edittip .edui-dialog-content {
width: 225px;
height: 60px;
}
/*edittd-dialog*/
.edui-default .edui-for-edittd .edui-dialog-content {
width: 240px;
height: 50px;
}
/*snapscreen-dialog*/
.edui-default .edui-for-snapscreen .edui-dialog-content {
width: 400px;
height: 220px;
}
/*music-dialog*/
.edui-default .edui-for-music .edui-dialog-content {
width: 515px;
height: 360px;
}
/*段落弹出菜单*/
.edui-default .edui-for-paragraph .edui-listitem-label {
font-family: Tahoma, Verdana, Arial, Helvetica;
}
.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-p {
font-size: 22px;
line-height: 27px;
}
.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h1 {
font-weight: bolder;
font-size: 32px;
line-height: 36px;
}
.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h2 {
font-weight: bolder;
font-size: 27px;
line-height: 29px;
}
.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h3 {
font-weight: bolder;
font-size: 19px;
line-height: 23px;
}
.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h4 {
font-weight: bolder;
font-size: 16px;
line-height: 19px
}
.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h5 {
font-weight: bolder;
font-size: 13px;
line-height: 16px;
}
.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h6 {
font-weight: bolder;
font-size: 12px;
line-height: 14px;
}
/* 表格弹出菜单 */
.edui-default .edui-for-inserttable .edui-splitborder {
display: none
}
.edui-default .edui-for-inserttable .edui-splitbutton-body .edui-arrow {
width: 0
}
.edui-default .edui-toolbar .edui-for-inserttable .edui-state-active .edui-splitborder{
border-left: 1px solid transparent;
}
.edui-default .edui-tablepicker .edui-infoarea {
height: 14px;
line-height: 14px;
font-size: 12px;
width: 220px;
margin-bottom: 3px;
clear: both;
}
.edui-default .edui-tablepicker .edui-infoarea .edui-label {
float: left;
}
.edui-default .edui-dialog-buttons .edui-label {
line-height: 24px;
}
.edui-default .edui-tablepicker .edui-infoarea .edui-clickable {
float: right;
}
.edui-default .edui-tablepicker .edui-pickarea {
background: url("../images/unhighlighted.gif") repeat;
height: 220px;
width: 220px;
}
.edui-default .edui-tablepicker .edui-pickarea .edui-overlay {
background: url("../images/highlighted.gif") repeat;
}
/* 颜色弹出菜单 */
.edui-default .edui-colorpicker-topbar {
height: 27px;
width: 200px;
/*border-bottom: 1px gray dashed;*/
}
.edui-default .edui-colorpicker-preview {
height: 20px;
border: 1px inset black;
margin-left: 1px;
width: 128px;
float: left;
}
.edui-default .edui-colorpicker-nocolor {
float: right;
margin-right: 1px;
font-size: 12px;
line-height: 14px;
height: 14px;
border: 1px solid #333;
padding: 3px 5px;
cursor: pointer;
}
.edui-default .edui-colorpicker-tablefirstrow {
height: 30px;
}
.edui-default .edui-colorpicker-colorcell {
width: 14px;
height: 14px;
display: block;
margin: 0;
cursor: pointer;
}
.edui-default .edui-colorpicker-colorcell:hover {
width: 14px;
height: 14px;
margin: 0;
}
.edui-default .edui-colorpicker-advbtn{
display: block;
text-align: center;
cursor: pointer;
height:20px;
}
.arrow_down{
background: white url('../images/arrow_down.png') no-repeat center;
}
.arrow_up{
background: white url('../images/arrow_up.png') no-repeat center;
}
/*高级的样式*/
.edui-colorpicker-adv{
position: relative;
overflow: hidden;
height: 180px;
display: none;
}
.edui-colorpicker-plant, .edui-colorpicker-hue {
border: solid 1px #666;
}
.edui-colorpicker-pad {
width: 150px;
height: 150px;
left: 14px;
top: 13px;
position: absolute;
background: red;
overflow: hidden;
cursor: crosshair;
}
.edui-colorpicker-cover{
position: absolute;
top: 0;
left: 0;
width: 150px;
height: 150px;
background: url("../images/tangram-colorpicker.png") -160px -200px;
}
.edui-colorpicker-padDot{
position: absolute;
top: 0;
left: 0;
width: 11px;
height: 11px;
overflow: hidden;
background: url(../images/tangram-colorpicker.png) 0px -200px repeat-x;
z-index: 1000;
}
.edui-colorpicker-sliderMain {
position: absolute;
left: 171px;
top: 13px;
width: 19px;
height: 152px;
background: url(../images/tangram-colorpicker.png) -179px -12px no-repeat;
}
.edui-colorpicker-slider {
width: 100%;
height: 100%;
cursor: pointer;
}
.edui-colorpicker-thumb{
position: absolute;
top: 0;
cursor: pointer;
height: 3px;
left: -1px;
right: -1px;
border: 1px solid black;
background: white;
opacity: .8;
}
/*自动排版弹出菜单*/
.edui-default .edui-autotypesetpicker .edui-autotypesetpicker-body {
font-size: 12px;
margin-bottom: 3px;
clear: both;
}
.edui-default .edui-autotypesetpicker-body table {
border-collapse: separate;
border-spacing: 2px;
}
.edui-default .edui-autotypesetpicker-body td {
font-size: 12px;
word-wrap:break-word;
}
.edui-default .edui-autotypesetpicker-body td input {
margin: 3px 3px 3px 4px;
*margin: 1px 0 0 0;
}
/*自动排版弹出菜单*/
.edui-default .edui-cellalignpicker .edui-cellalignpicker-body {
width: 70px;
font-size: 12px;
cursor: default;
}
.edui-default .edui-cellalignpicker-body table {
border-collapse: separate;
border-spacing: 0;
}
.edui-default .edui-cellalignpicker-body td{
padding: 1px;
}
.edui-default .edui-cellalignpicker-body .edui-icon{
height: 20px;
width: 20px;
padding: 1px;
background-image: url(../images/table-cell-align.png);
}
.edui-default .edui-cellalignpicker-body .edui-left{
background-position: 0 0;
}
.edui-default .edui-cellalignpicker-body .edui-center{
background-position: -25px 0;
}
.edui-default .edui-cellalignpicker-body .edui-right{
background-position: -51px 0;
}
.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-left{
background-position: -73px 0;
}
.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-center{
background-position: -98px 0;
}
.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-right{
background-position: -124px 0;
}
.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-left {
background-position: -146px 0;
background-color: #f1f4f5;
}
.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-center {
background-position: -245px 0;
}
.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-right {
background-position: -271px 0;
}
/*分隔线*/
.edui-default .edui-toolbar .edui-separator {
width: 2px;
height: 20px;
margin: 2px 4px 2px 3px;
background: url(../images/icons.png) -181px 0;
background: url(../images/icons.gif) -181px 0 \9;
}
/*颜色按钮 */
.edui-default .edui-toolbar .edui-colorbutton .edui-colorlump {
position: absolute;
overflow: hidden;
bottom: 1px;
left: 1px;
width: 18px;
height: 4px;
}
/*表情按钮及弹出菜单*/
/*去除了表情的下拉箭头*/
.edui-default .edui-for-emotion .edui-icon {
background-position: -60px -20px;
}
.edui-default .edui-for-emotion .edui-popup-content iframe
{
width: 514px;
height: 380px;
overflow: hidden;
}
.edui-default .edui-for-emotion .edui-popup-content
{
position: relative;
z-index: 555
}
.edui-default .edui-for-emotion .edui-splitborder {
display: none
}
.edui-default .edui-for-emotion .edui-splitbutton-body .edui-arrow
{
width: 0
}
.edui-default .edui-toolbar .edui-for-emotion .edui-state-active .edui-splitborder
{
border-left: 1px solid transparent;
}
/*contextmenu*/
.edui-default .edui-hassubmenu .edui-arrow {
height: 20px;
width: 20px;
float: right;
background: url("../images/icons-all.gif") no-repeat 10px -233px;
}
.edui-default .edui-menu-body .edui-menuitem {
padding: 1px;
}
.edui-default .edui-menuseparator {
margin: 2px 0;
height: 1px;
overflow: hidden;
}
.edui-default .edui-menuseparator-inner {
border-bottom: 1px solid #e2e3e3;
margin-left: 29px;
margin-right: 1px;
}
.edui-default .edui-menu-body .edui-state-hover {
padding: 0 !important;
background-color: #fff5d4;
border: 1px solid #dcac6c;
}
/*弹出菜单*/
.edui-default .edui-shortcutmenu {
padding: 2px;
width: 190px;
height: 50px;
background-color: #fff;
border: 1px solid #ccc;
border-radius: 5px;
}
/*粘贴弹出菜单*/
.edui-default .edui-wordpastepop .edui-popup-content{
border: none;
padding: 0;
width: 54px;
height: 21px;
}
.edui-default .edui-pasteicon {
width: 100%;
height: 100%;
background-image: url('../images/wordpaste.png');
background-position: 0 0;
}
.edui-default .edui-pasteicon.edui-state-opened {
background-position: 0 -34px;
}
.edui-default .edui-pastecontainer {
position: relative;
visibility: hidden;
width: 97px;
background: #fff;
border: 1px solid #ccc;
}
.edui-default .edui-pastecontainer .edui-title {
font-weight: bold;
background: #F8F8FF;
height: 25px;
line-height: 25px;
font-size: 12px;
padding-left: 5px;
}
.edui-default .edui-pastecontainer .edui-button {
overflow: hidden;
margin: 3px 0;
}
.edui-default .edui-pastecontainer .edui-button .edui-richtxticon,
.edui-default .edui-pastecontainer .edui-button .edui-tagicon,
.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon{
float: left;
cursor: pointer;
width: 29px;
height: 29px;
margin-left: 5px;
background-image: url('../images/wordpaste.png');
background-repeat: no-repeat;
}
.edui-default .edui-pastecontainer .edui-button .edui-richtxticon {
margin-left: 0;
background-position: -109px 0;
}
.edui-default .edui-pastecontainer .edui-button .edui-tagicon {
background-position: -148px 1px;
}
.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon {
background-position: -72px 0;
}
.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-richtxticon {
background-position: -109px -34px;
}
.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-tagicon{
background-position: -148px -34px;
}
.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-plaintxticon{
background-position: -72px -34px;
}
\ No newline at end of file
/*!
* UEditor
* version: ueditor
* build: Thu May 29 2014 16:47:49 GMT+0800 (中国标准时间)
*/
.edui-default .edui-box{border:0;padding:0;margin:0;overflow:hidden}.edui-default a.edui-box{display:block;text-decoration:none;color:#000}.edui-default a.edui-box:hover{text-decoration:none}.edui-default a.edui-box:active{text-decoration:none}.edui-default table.edui-box{border-collapse:collapse}.edui-default ul.edui-box{list-style-type:none}div.edui-box{position:relative;display:-moz-inline-box!important;display:inline-block!important;vertical-align:top}.edui-default .edui-clearfix{zoom:1}.edui-default .edui-clearfix:after{content:'\20';display:block;clear:both}* html div.edui-box{display:inline!important}:first-child+html div.edui-box{display:inline!important}.edui-default .edui-button-body,.edui-splitbutton-body,.edui-menubutton-body,.edui-combox-body{position:relative}.edui-default .edui-popup{position:absolute;-webkit-user-select:none;-moz-user-select:none}.edui-default .edui-popup .edui-shadow{position:absolute;z-index:-1}.edui-default .edui-popup .edui-bordereraser{position:absolute;overflow:hidden}.edui-default .edui-tablepicker .edui-canvas{position:relative}.edui-default .edui-tablepicker .edui-canvas .edui-overlay{position:absolute}.edui-default .edui-dialog-modalmask,.edui-dialog-dragmask{position:absolute;left:0;top:0;width:100%;height:100%}.edui-default .edui-toolbar{position:relative}.edui-default .edui-label{cursor:default}.edui-default span.edui-clickable{color:#00f;cursor:pointer;text-decoration:underline}.edui-default span.edui-unclickable{color:gray;cursor:default}.edui-default .edui-toolbar{cursor:default;-webkit-user-select:none;-moz-user-select:none;padding:1px;overflow:hidden;zoom:1;width:auto;height:auto}.edui-default .edui-toolbar .edui-button,.edui-default .edui-toolbar .edui-splitbutton,.edui-default .edui-toolbar .edui-menubutton,.edui-default .edui-toolbar .edui-combox{margin:1px}.edui-default .edui-editor{border:1px solid #d4d4d4;background-color:#fff;position:relative;overflow:visible;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.edui-editor div{width:auto;height:auto}.edui-default .edui-editor-toolbarbox{position:relative;zoom:1;-webkit-box-shadow:0 1px 4px rgba(204,204,204,.6);-moz-box-shadow:0 1px 4px rgba(204,204,204,.6);box-shadow:0 1px 4px rgba(204,204,204,.6);border-top-left-radius:2px;border-top-right-radius:2px}.edui-default .edui-editor-toolbarboxouter{border-bottom:1px solid #d4d4d4;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,.065);box-shadow:0 1px 4px rgba(0,0,0,.065)}.edui-default .edui-editor-toolbarboxinner{padding:2px}.edui-default .edui-editor-iframeholder{position:relative}.edui-default .edui-editor-bottomContainer{overflow:hidden}.edui-default .edui-editor-bottomContainer table{width:100%;height:0;overflow:hidden;border-spacing:0}.edui-default .edui-editor-bottomContainer td{white-space:nowrap;border-top:1px solid #ccc;line-height:20px;font-size:12px;font-family:Arial,Helvetica,Tahoma,Verdana,Sans-Serif}.edui-default .edui-editor-wordcount{text-align:right;margin-right:5px;color:#aaa}.edui-default .edui-editor-scale{width:12px}.edui-default .edui-editor-scale .edui-editor-icon{float:right;width:100%;height:12px;margin-top:10px;background:url(../images/scale.png) no-repeat;cursor:se-resize}.edui-default .edui-editor-breadcrumb{margin:2px 0 0 3px}.edui-default .edui-editor-breadcrumb span{cursor:pointer;text-decoration:underline;color:#00f}.edui-default .edui-toolbar .edui-for-fullscreen{float:right}.edui-default .edui-bubble .edui-popup-content{border:1px solid #DCAC6C;background-color:#fff6d9;padding:5px;font-size:10pt;font-family:"宋体"}.edui-default .edui-bubble .edui-shadow{}.edui-default .edui-editor-toolbarmsg{background-color:#FFF6D9;border-bottom:1px solid #ccc;position:absolute;bottom:-25px;left:0;z-index:1009;width:99.9%}.edui-default .edui-editor-toolbarmsg-upload{font-size:14px;color:#00f;width:100px;height:16px;line-height:16px;cursor:pointer;position:absolute;top:5px;left:350px}.edui-default .edui-editor-toolbarmsg-label{font-size:12px;line-height:16px;padding:4px}.edui-default .edui-editor-toolbarmsg-close{float:right;width:20px;height:16px;line-height:16px;cursor:pointer;color:red}.edui-default .edui-list .edui-bordereraser{display:none}.edui-default .edui-listitem{padding:1px;white-space:nowrap}.edui-default .edui-list .edui-state-hover{position:relative;background-color:#fff5d4;border:1px solid #dcac6c;padding:0}.edui-default .edui-for-fontfamily .edui-listitem-label{min-width:130px;_width:120px;font-size:12px;height:22px;line-height:22px;padding-left:5px}.edui-default .edui-for-insertcode .edui-listitem-label{min-width:120px;_width:120px;font-size:12px;height:22px;line-height:22px;padding-left:5px}.edui-default .edui-for-underline .edui-listitem-label{min-width:120px;_width:120px;padding:3px 5px;font-size:12px}.edui-default .edui-for-fontsize .edui-listitem-label{min-width:120px;_width:120px;padding:3px 5px}.edui-default .edui-for-paragraph .edui-listitem-label{min-width:200px;_width:200px;padding:2px 5px}.edui-default .edui-for-rowspacingtop .edui-listitem-label,.edui-default .edui-for-rowspacingbottom .edui-listitem-label{min-width:53px;_width:53px;padding:2px 5px}.edui-default .edui-for-lineheight .edui-listitem-label{min-width:53px;_width:53px;padding:2px 5px}.edui-default .edui-for-customstyle .edui-listitem-label{min-width:200px;_width:200px;width:200px!important;padding:2px 5px}.edui-default .edui-menu{z-index:3000}.edui-default .edui-menu .edui-popup-content{padding:3px}.edui-default .edui-menu-body{_width:150px;min-width:170px;background:url(../images/sparator_v.png) repeat-y 25px}.edui-default .edui-menuitem-body{}.edui-default .edui-menuitem{height:20px;cursor:default;vertical-align:top}.edui-default .edui-menuitem .edui-icon{width:20px!important;height:20px!important;background:url(../images/icons.png) 0 -4000px;background:url(../images/icons.gif) 0 -4000px\9}.edui-default .edui-menuitem .edui-label{font-size:12px;line-height:20px;height:20px;padding-left:10px}.edui-default .edui-state-checked .edui-menuitem-body{background:url(../images/icons-all.gif) no-repeat 6px -205px}.edui-default .edui-state-disabled .edui-menuitem-label{color:gray}.edui-default .edui-toolbar .edui-combox-body .edui-button-body{width:60px;font-size:12px;height:20px;line-height:20px;padding-left:5px;white-space:nowrap;margin:0 3px 0 0}.edui-default .edui-toolbar .edui-combox-body .edui-arrow{background:url(../images/icons.png) -741px 0;_background:url(../images/icons.gif) -741px 0;height:20px;width:9px}.edui-default .edui-toolbar .edui-combox .edui-combox-body{border:1px solid #CCC;background-color:#fff;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.edui-default .edui-toolbar .edui-combox-body .edui-splitborder{display:none}.edui-default .edui-toolbar .edui-combox-body .edui-arrow{border-left:1px solid #CCC}.edui-default .edui-toolbar .edui-state-hover .edui-combox-body{background-color:#fff5d4;border:1px solid #dcac6c}.edui-default .edui-toolbar .edui-state-hover .edui-combox-body .edui-arrow{border-left:1px solid #dcac6c}.edui-default .edui-toolbar .edui-state-checked .edui-combox-body{background-color:#FFE69F;border:1px solid #DCAC6C}.edui-toolbar .edui-state-checked .edui-combox-body .edui-arrow{border-left:1px solid #DCAC6C}.edui-toolbar .edui-state-disabled .edui-combox-body{background-color:#F0F0EE;opacity:.3;filter:alpha(opacity=30)}.edui-toolbar .edui-state-opened .edui-combox-body{background-color:#fff;border:1px solid gray}.edui-default .edui-toolbar .edui-button .edui-icon,.edui-default .edui-toolbar .edui-menubutton .edui-icon,.edui-default .edui-toolbar .edui-splitbutton .edui-icon{height:20px!important;width:20px!important;background-image:url(../images/icons.png);background-image:url(../images/icons.gif) \9}.edui-default .edui-toolbar .edui-button .edui-button-wrap{padding:1px;position:relative}.edui-default .edui-toolbar .edui-button .edui-state-hover .edui-button-wrap{background-color:#fff5d4;padding:0;border:1px solid #dcac6c}.edui-default .edui-toolbar .edui-button .edui-state-checked .edui-button-wrap{background-color:#ffe69f;padding:0;border:1px solid #dcac6c;border-radius:2px;-webkit-border-radius:2px;-moz-border-radius:2px}.edui-default .edui-toolbar .edui-button .edui-state-active .edui-button-wrap{background-color:#fff;padding:0;border:1px solid gray}.edui-default .edui-toolbar .edui-state-disabled .edui-label{color:#ccc}.edui-default .edui-toolbar .edui-state-disabled .edui-icon{opacity:.3;filter:alpha(opacity=30)}.edui-default .edui-for-undo .edui-icon{background-position:-160px 0}.edui-default .edui-for-redo .edui-icon{background-position:-100px 0}.edui-default .edui-for-bold .edui-icon{background-position:0 0}.edui-default .edui-for-italic .edui-icon{background-position:-60px 0}.edui-default .edui-for-fontborder .edui-icon{background-position:-160px -40px}.edui-default .edui-for-underline .edui-icon{background-position:-140px 0}.edui-default .edui-for-strikethrough .edui-icon{background-position:-120px 0}.edui-default .edui-for-subscript .edui-icon{background-position:-600px 0}.edui-default .edui-for-superscript .edui-icon{background-position:-620px 0}.edui-default .edui-for-blockquote .edui-icon{background-position:-220px 0}.edui-default .edui-for-forecolor .edui-icon{background-position:-720px 0}.edui-default .edui-for-backcolor .edui-icon{background-position:-760px 0}.edui-default .edui-for-inserttable .edui-icon{background-position:-580px -20px}.edui-default .edui-for-autotypeset .edui-icon{background-position:-640px -40px}.edui-default .edui-for-justifyleft .edui-icon{background-position:-460px 0}.edui-default .edui-for-justifycenter .edui-icon{background-position:-420px 0}.edui-default .edui-for-justifyright .edui-icon{background-position:-480px 0}.edui-default .edui-for-justifyjustify .edui-icon{background-position:-440px 0}.edui-default .edui-for-insertorderedlist .edui-icon{background-position:-80px 0}.edui-default .edui-for-insertunorderedlist .edui-icon{background-position:-20px 0}.edui-default .edui-for-lineheight .edui-icon{background-position:-725px -40px}.edui-default .edui-for-rowspacingbottom .edui-icon{background-position:-745px -40px}.edui-default .edui-for-rowspacingtop .edui-icon{background-position:-765px -40px}.edui-default .edui-for-horizontal .edui-icon{background-position:-360px 0}.edui-default .edui-for-link .edui-icon{background-position:-500px 0}.edui-default .edui-for-code .edui-icon{background-position:-440px -40px}.edui-default .edui-for-insertimage .edui-icon{background-position:-726px -77px}.edui-default .edui-for-insertframe .edui-icon{background-position:-240px -40px}.edui-default .edui-for-emoticon .edui-icon{background-position:-60px -20px}.edui-default .edui-for-spechars .edui-icon{background-position:-240px 0}.edui-default .edui-for-help .edui-icon{background-position:-340px 0}.edui-default .edui-for-print .edui-icon{background-position:-440px -20px}.edui-default .edui-for-preview .edui-icon{background-position:-420px -20px}.edui-default .edui-for-selectall .edui-icon{background-position:-400px -20px}.edui-default .edui-for-searchreplace .edui-icon{background-position:-520px -20px}.edui-default .edui-for-map .edui-icon{background-position:-40px -40px}.edui-default .edui-for-gmap .edui-icon{background-position:-260px -40px}.edui-default .edui-for-insertvideo .edui-icon{background-position:-320px -20px}.edui-default .edui-for-time .edui-icon{background-position:-160px -20px}.edui-default .edui-for-date .edui-icon{background-position:-140px -20px}.edui-default .edui-for-cut .edui-icon{background-position:-680px 0}.edui-default .edui-for-copy .edui-icon{background-position:-700px 0}.edui-default .edui-for-paste .edui-icon{background-position:-560px 0}.edui-default .edui-for-formatmatch .edui-icon{background-position:-40px 0}.edui-default .edui-for-pasteplain .edui-icon{background-position:-360px -20px}.edui-default .edui-for-directionalityltr .edui-icon{background-position:-20px -20px}.edui-default .edui-for-directionalityrtl .edui-icon{background-position:-40px -20px}.edui-default .edui-for-source .edui-icon{background-position:-261px -0px}.edui-default .edui-for-removeformat .edui-icon{background-position:-580px 0}.edui-default .edui-for-unlink .edui-icon{background-position:-640px 0}.edui-default .edui-for-touppercase .edui-icon{background-position:-786px 0}.edui-default .edui-for-tolowercase .edui-icon{background-position:-806px 0}.edui-default .edui-for-insertrow .edui-icon{background-position:-478px -76px}.edui-default .edui-for-insertrownext .edui-icon{background-position:-498px -76px}.edui-default .edui-for-insertcol .edui-icon{background-position:-455px -76px}.edui-default .edui-for-insertcolnext .edui-icon{background-position:-429px -76px}.edui-default .edui-for-mergeright .edui-icon{background-position:-60px -40px}.edui-default .edui-for-mergedown .edui-icon{background-position:-80px -40px}.edui-default .edui-for-splittorows .edui-icon{background-position:-100px -40px}.edui-default .edui-for-splittocols .edui-icon{background-position:-120px -40px}.edui-default .edui-for-insertparagraphbeforetable .edui-icon{background-position:-140px -40px}.edui-default .edui-for-deleterow .edui-icon{background-position:-660px -20px}.edui-default .edui-for-deletecol .edui-icon{background-position:-640px -20px}.edui-default .edui-for-splittocells .edui-icon{background-position:-800px -20px}.edui-default .edui-for-mergecells .edui-icon{background-position:-760px -20px}.edui-default .edui-for-deletetable .edui-icon{background-position:-620px -20px}.edui-default .edui-for-cleardoc .edui-icon{background-position:-520px 0}.edui-default .edui-for-fullscreen .edui-icon{background-position:-100px -20px}.edui-default .edui-for-anchor .edui-icon{background-position:-200px 0}.edui-default .edui-for-pagebreak .edui-icon{background-position:-460px -40px}.edui-default .edui-for-imagenone .edui-icon{background-position:-480px -40px}.edui-default .edui-for-imageleft .edui-icon{background-position:-500px -40px}.edui-default .edui-for-wordimage .edui-icon{background-position:-660px -40px}.edui-default .edui-for-imageright .edui-icon{background-position:-520px -40px}.edui-default .edui-for-imagecenter .edui-icon{background-position:-540px -40px}.edui-default .edui-for-indent .edui-icon{background-position:-400px 0}.edui-default .edui-for-outdent .edui-icon{background-position:-540px 0}.edui-default .edui-for-webapp .edui-icon{background-position:-601px -40px}.edui-default .edui-for-table .edui-icon{background-position:-580px -20px}.edui-default .edui-for-edittable .edui-icon{background-position:-420px -40px}.edui-default .edui-for-template .edui-icon{background-position:-339px -40px}.edui-default .edui-for-delete .edui-icon{background-position:-360px -40px}.edui-default .edui-for-attachment .edui-icon{background-position:-620px -40px}.edui-default .edui-for-edittd .edui-icon{background-position:-700px -40px}.edui-default .edui-for-snapscreen .edui-icon{background-position:-581px -40px}.edui-default .edui-for-scrawl .edui-icon{background-position:-801px -41px}.edui-default .edui-for-background .edui-icon{background-position:-680px -40px}.edui-default .edui-for-music .edui-icon{background-position:-18px -40px}.edui-default .edui-for-formula .edui-icon{background-position:-200px -40px}.edui-default .edui-for-aligntd .edui-icon{background-position:-236px -76px}.edui-default .edui-for-insertparagraphtrue .edui-icon{background-position:-625px -76px}.edui-default .edui-for-insertparagraph .edui-icon{background-position:-602px -76px}.edui-default .edui-for-insertcaption .edui-icon{background-position:-336px -76px}.edui-default .edui-for-deletecaption .edui-icon{background-position:-362px -76px}.edui-default .edui-for-inserttitle .edui-icon{background-position:-286px -76px}.edui-default .edui-for-deletetitle .edui-icon{background-position:-311px -76px}.edui-default .edui-for-aligntable .edui-icon{background-position:-440px 0}.edui-default .edui-for-tablealignment-left .edui-icon{background-position:-460px 0}.edui-default .edui-for-tablealignment-center .edui-icon{background-position:-420px 0}.edui-default .edui-for-tablealignment-right .edui-icon{background-position:-480px 0}.edui-default .edui-for-drafts .edui-icon{background-position:-560px 0}.edui-default .edui-for-charts .edui-icon{background:url( ../images/charts.png ) no-repeat 2px 3px!important}.edui-default .edui-for-inserttitlecol .edui-icon{background-position:-673px -76px}.edui-default .edui-for-deletetitlecol .edui-icon{background-position:-698px -76px}.edui-default .edui-for-simpleupload .edui-icon{background-position:-380px 0}.edui-default .edui-toolbar .edui-splitbutton-body .edui-arrow,.edui-default .edui-toolbar .edui-menubutton-body .edui-arrow{background:url(../images/icons.png) -741px 0;_background:url(../images/icons.gif) -741px 0;height:20px;width:9px}.edui-default .edui-toolbar .edui-splitbutton .edui-splitbutton-body,.edui-default .edui-toolbar .edui-menubutton .edui-menubutton-body{padding:1px}.edui-default .edui-toolbar .edui-splitborder{width:1px;height:20px}.edui-default .edui-toolbar .edui-state-hover .edui-splitborder{width:1px;border-left:0 solid #dcac6c}.edui-default .edui-toolbar .edui-state-active .edui-splitborder{width:0;border-left:1px solid gray}.edui-default .edui-toolbar .edui-state-opened .edui-splitborder{width:1px;border:0}.edui-default .edui-toolbar .edui-splitbutton .edui-state-hover .edui-splitbutton-body,.edui-default .edui-toolbar .edui-menubutton .edui-state-hover .edui-menubutton-body{background-color:#fff5d4;border:1px solid #dcac6c;padding:0}.edui-default .edui-toolbar .edui-splitbutton .edui-state-checked .edui-splitbutton-body,.edui-default .edui-toolbar .edui-menubutton .edui-state-checked .edui-menubutton-body{background-color:#FFE69F;border:1px solid #DCAC6C;padding:0}.edui-default .edui-toolbar .edui-splitbutton .edui-state-active .edui-splitbutton-body,.edui-default .edui-toolbar .edui-menubutton .edui-state-active .edui-menubutton-body{background-color:#fff;border:1px solid gray;padding:0}.edui-default .edui-state-disabled .edui-arrow{opacity:.3;_filter:alpha(opacity=30)}.edui-default .edui-toolbar .edui-splitbutton .edui-state-opened .edui-splitbutton-body,.edui-default .edui-toolbar .edui-menubutton .edui-state-opened .edui-menubutton-body{background-color:#fff;border:1px solid gray;padding:0}.edui-default .edui-for-insertorderedlist .edui-bordereraser,.edui-default .edui-for-lineheight .edui-bordereraser,.edui-default .edui-for-rowspacingtop .edui-bordereraser,.edui-default .edui-for-rowspacingbottom .edui-bordereraser,.edui-default .edui-for-insertunorderedlist .edui-bordereraser{background-color:#fff}.edui-default .edui-for-insertorderedlist .edui-popup-body .edui-icon,.edui-default .edui-for-lineheight .edui-popup-body .edui-icon,.edui-default .edui-for-rowspacingtop .edui-popup-body .edui-icon,.edui-default .edui-for-rowspacingbottom .edui-popup-body .edui-icon,.edui-default .edui-for-insertunorderedlist .edui-popup-body .edui-icon{background-image:none}.edui-default .edui-popup{z-index:3000;background-color:#fff;width:auto;height:auto}.edui-default .edui-popup .edui-shadow{left:0;top:0;width:100%;height:100%}.edui-default .edui-popup-content{border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 4px rgba(0,0,0,.2);-moz-box-shadow:0 3px 4px rgba(0,0,0,.2);box-shadow:0 3px 4px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;padding:5px;background:#fff}.edui-default .edui-popup .edui-bordereraser{background-color:#fff;height:3px}.edui-default .edui-menu .edui-bordereraser{height:3px}.edui-default .edui-anchor-topleft .edui-bordereraser{left:1px;top:-2px}.edui-default .edui-anchor-topright .edui-bordereraser{right:1px;top:-2px}.edui-default .edui-anchor-bottomleft .edui-bordereraser{left:0;bottom:-6px;height:7px;border-left:1px solid gray;border-right:1px solid gray}.edui-default .edui-anchor-bottomright .edui-bordereraser{right:0;bottom:-6px;height:7px;border-left:1px solid gray;border-right:1px solid gray}.edui-popup div{width:auto;height:auto}.edui-default .edui-editor-messageholder{display:block;width:150px;height:auto;border:0;margin:0;padding:0;position:absolute;top:28px;right:3px}.edui-default .edui-message{min-height:10px;text-shadow:0 1px 0 rgba(255,255,255,.5);padding:0;margin-bottom:3px;position:relative}.edui-default .edui-message-body{border-radius:3px;padding:8px 15px 8px 8px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5}.edui-default .edui-message-type-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.edui-default .edui-message-type-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.edui-default .edui-message-type-danger,.edui-default .edui-message-type-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.edui-default .edui-message .edui-message-closer{display:block;width:16px;height:16px;line-height:16px;position:absolute;top:0;right:0;padding:0;cursor:pointer;background:transparent;border:0;float:right;font-size:20px;font-weight:700;color:#999;text-shadow:0 1px 0 #fff;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}.edui-default .edui-message .edui-message-content{font-size:10pt;word-wrap:break-word;word-break:normal}.edui-default .edui-dialog{z-index:2000;position:absolute}.edui-dialog div{width:auto}.edui-default .edui-dialog-wrap{margin-right:6px;margin-bottom:6px}.edui-default .edui-dialog-fullscreen-flag{margin-right:0;margin-bottom:0}.edui-default .edui-dialog-body{position:relative;padding:2px 0 0 2px;_zoom:1}.edui-default .edui-dialog-fullscreen-flag .edui-dialog-body{padding:0}.edui-default .edui-dialog-shadow{position:absolute;z-index:-1;left:0;top:0;width:100%;height:100%;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.edui-default .edui-dialog-foot{background-color:#fff}.edui-default .edui-dialog-titlebar{height:26px;border-bottom:1px solid #c6c6c6;background:url(../images/dialog-title-bg.png) repeat-x bottom;position:relative;cursor:move}.edui-default .edui-dialog-caption{font-weight:700;font-size:12px;line-height:26px;padding-left:5px}.edui-default .edui-dialog-draghandle{height:26px}.edui-default .edui-dialog-closebutton{position:absolute!important;right:5px;top:3px}.edui-default .edui-dialog-closebutton .edui-button-body{height:20px;width:20px;cursor:pointer;background:url(../images/icons-all.gif) no-repeat 0 -59px}.edui-default .edui-dialog-closebutton .edui-state-hover .edui-button-body{background:url(../images/icons-all.gif) no-repeat 0 -89px}.edui-default .edui-dialog-foot{height:40px}.edui-default .edui-dialog-buttons{position:absolute;right:0}.edui-default .edui-dialog-buttons .edui-button{margin-right:10px}.edui-default .edui-dialog-buttons .edui-button .edui-button-body{background:url(../images/icons-all.gif) no-repeat;height:24px;width:96px;font-size:12px;line-height:24px;text-align:center;cursor:default}.edui-default .edui-dialog-buttons .edui-button .edui-state-hover .edui-button-body{background:url(../images/icons-all.gif) no-repeat 0 -30px}.edui-default .edui-dialog iframe{border:0;padding:0;margin:0;vertical-align:top}.edui-default .edui-dialog-modalmask{opacity:.3;filter:alpha(opacity=30);background-color:#ccc;position:absolute}.edui-default .edui-dialog-dragmask{position:absolute;background-color:transparent;cursor:move}.edui-default .edui-dialog-content{position:relative}.edui-default .dialogcontmask{cursor:move;visibility:hidden;display:block;position:absolute;width:100%;height:100%;opacity:0;filter:alpha(opacity=0)}.edui-default .edui-for-link .edui-dialog-content{width:420px;height:200px;overflow:hidden}.edui-default .edui-for-background .edui-dialog-content{width:440px;height:280px;overflow:hidden}.edui-default .edui-for-template .edui-dialog-content{width:630px;height:390px;overflow:hidden}.edui-default .edui-for-scrawl .edui-dialog-content{width:515px;*width:506px;height:360px}.edui-default .edui-for-spechars .edui-dialog-content{width:620px;height:500px;*width:630px;*height:570px}.edui-default .edui-for-insertimage .edui-dialog-content{width:650px;height:400px;overflow:hidden}.edui-default .edui-for-webapp .edui-dialog-content{width:560px;_width:565px;height:450px;overflow:hidden}.edui-default .edui-for-insertframe .edui-dialog-content{width:350px;height:200px;overflow:hidden}.edui-default .edui-for-wordimage .edui-dialog-content{width:620px;height:380px;overflow:hidden}.edui-default .edui-for-attachment .edui-dialog-content{width:650px;height:400px;overflow:hidden}.edui-default .edui-for-map .edui-dialog-content{width:550px;height:400px}.edui-default .edui-for-gmap .edui-dialog-content{width:550px;height:400px}.edui-default .edui-for-insertvideo .edui-dialog-content{width:590px;height:390px}.edui-default .edui-for-anchor .edui-dialog-content{width:320px;height:60px;overflow:hidden}.edui-default .edui-for-searchreplace .edui-dialog-content{width:400px;height:220px}.edui-default .edui-for-help .edui-dialog-content{width:400px;height:420px}.edui-default .edui-for-edittable .edui-dialog-content{width:540px;_width:590px;height:335px}.edui-default .edui-for-edittip .edui-dialog-content{width:225px;height:60px}.edui-default .edui-for-edittd .edui-dialog-content{width:240px;height:50px}.edui-default .edui-for-snapscreen .edui-dialog-content{width:400px;height:220px}.edui-default .edui-for-music .edui-dialog-content{width:515px;height:360px}.edui-default .edui-for-paragraph .edui-listitem-label{font-family:Tahoma,Verdana,Arial,Helvetica}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-p{font-size:22px;line-height:27px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h1{font-weight:bolder;font-size:32px;line-height:36px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h2{font-weight:bolder;font-size:27px;line-height:29px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h3{font-weight:bolder;font-size:19px;line-height:23px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h4{font-weight:bolder;font-size:16px;line-height:19px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h5{font-weight:bolder;font-size:13px;line-height:16px}.edui-default .edui-for-paragraph .edui-listitem-label .edui-for-h6{font-weight:bolder;font-size:12px;line-height:14px}.edui-default .edui-for-inserttable .edui-splitborder{display:none}.edui-default .edui-for-inserttable .edui-splitbutton-body .edui-arrow{width:0}.edui-default .edui-toolbar .edui-for-inserttable .edui-state-active .edui-splitborder{border-left:1px solid transparent}.edui-default .edui-tablepicker .edui-infoarea{height:14px;line-height:14px;font-size:12px;width:220px;margin-bottom:3px;clear:both}.edui-default .edui-tablepicker .edui-infoarea .edui-label{float:left}.edui-default .edui-dialog-buttons .edui-label{line-height:24px}.edui-default .edui-tablepicker .edui-infoarea .edui-clickable{float:right}.edui-default .edui-tablepicker .edui-pickarea{background:url(../images/unhighlighted.gif) repeat;height:220px;width:220px}.edui-default .edui-tablepicker .edui-pickarea .edui-overlay{background:url(../images/highlighted.gif) repeat}.edui-default .edui-colorpicker-topbar{height:27px;width:200px}.edui-default .edui-colorpicker-preview{height:20px;border:1px inset #000;margin-left:1px;width:128px;float:left}.edui-default .edui-colorpicker-nocolor{float:right;margin-right:1px;font-size:12px;line-height:14px;height:14px;border:1px solid #333;padding:3px 5px;cursor:pointer}.edui-default .edui-colorpicker-tablefirstrow{height:30px}.edui-default .edui-colorpicker-colorcell{width:14px;height:14px;display:block;margin:0;cursor:pointer}.edui-default .edui-colorpicker-colorcell:hover{width:14px;height:14px;margin:0}.edui-default .edui-colorpicker-advbtn{display:block;text-align:center;cursor:pointer;height:20px}.arrow_down{background:#fff url(../images/arrow_down.png) no-repeat center}.arrow_up{background:#fff url(../images/arrow_up.png) no-repeat center}.edui-colorpicker-adv{position:relative;overflow:hidden;height:180px;display:none}.edui-colorpicker-plant,.edui-colorpicker-hue{border:solid 1px #666}.edui-colorpicker-pad{width:150px;height:150px;left:14px;top:13px;position:absolute;background:red;overflow:hidden;cursor:crosshair}.edui-colorpicker-cover{position:absolute;top:0;left:0;width:150px;height:150px;background:url(../images/tangram-colorpicker.png) -160px -200px}.edui-colorpicker-padDot{position:absolute;top:0;left:0;width:11px;height:11px;overflow:hidden;background:url(../images/tangram-colorpicker.png) 0 -200px repeat-x;z-index:1000}.edui-colorpicker-sliderMain{position:absolute;left:171px;top:13px;width:19px;height:152px;background:url(../images/tangram-colorpicker.png) -179px -12px no-repeat}.edui-colorpicker-slider{width:100%;height:100%;cursor:pointer}.edui-colorpicker-thumb{position:absolute;top:0;cursor:pointer;height:3px;left:-1px;right:-1px;border:1px solid #000;background:#fff;opacity:.8}.edui-default .edui-autotypesetpicker .edui-autotypesetpicker-body{font-size:12px;margin-bottom:3px;clear:both}.edui-default .edui-autotypesetpicker-body table{border-collapse:separate;border-spacing:2px}.edui-default .edui-autotypesetpicker-body td{font-size:12px;word-wrap:break-word}.edui-default .edui-autotypesetpicker-body td input{margin:3px 3px 3px 4px;*margin:1px 0 0}.edui-default .edui-cellalignpicker .edui-cellalignpicker-body{width:70px;font-size:12px;cursor:default}.edui-default .edui-cellalignpicker-body table{border-collapse:separate;border-spacing:0}.edui-default .edui-cellalignpicker-body td{padding:1px}.edui-default .edui-cellalignpicker-body .edui-icon{height:20px;width:20px;padding:1px;background-image:url(../images/table-cell-align.png)}.edui-default .edui-cellalignpicker-body .edui-left{background-position:0 0}.edui-default .edui-cellalignpicker-body .edui-center{background-position:-25px 0}.edui-default .edui-cellalignpicker-body .edui-right{background-position:-51px 0}.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-left{background-position:-73px 0}.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-center{background-position:-98px 0}.edui-default .edui-cellalignpicker-body td.edui-state-hover .edui-right{background-position:-124px 0}.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-left{background-position:-146px 0;background-color:#f1f4f5}.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-center{background-position:-245px 0}.edui-default .edui-cellalignpicker-body td.edui-cellalign-selected .edui-right{background-position:-271px 0}.edui-default .edui-toolbar .edui-separator{width:2px;height:20px;margin:2px 4px 2px 3px;background:url(../images/icons.png) -181px 0;background:url(../images/icons.gif) -181px 0 \9}.edui-default .edui-toolbar .edui-colorbutton .edui-colorlump{position:absolute;overflow:hidden;bottom:1px;left:1px;width:18px;height:4px}.edui-default .edui-for-emotion .edui-icon{background-position:-60px -20px}.edui-default .edui-for-emotion .edui-popup-content iframe{width:514px;height:380px;overflow:hidden}.edui-default .edui-for-emotion .edui-popup-content{position:relative;z-index:555}.edui-default .edui-for-emotion .edui-splitborder{display:none}.edui-default .edui-for-emotion .edui-splitbutton-body .edui-arrow{width:0}.edui-default .edui-toolbar .edui-for-emotion .edui-state-active .edui-splitborder{border-left:1px solid transparent}.edui-default .edui-hassubmenu .edui-arrow{height:20px;width:20px;float:right;background:url(../images/icons-all.gif) no-repeat 10px -233px}.edui-default .edui-menu-body .edui-menuitem{padding:1px}.edui-default .edui-menuseparator{margin:2px 0;height:1px;overflow:hidden}.edui-default .edui-menuseparator-inner{border-bottom:1px solid #e2e3e3;margin-left:29px;margin-right:1px}.edui-default .edui-menu-body .edui-state-hover{padding:0!important;background-color:#fff5d4;border:1px solid #dcac6c}.edui-default .edui-shortcutmenu{padding:2px;width:190px;height:50px;background-color:#fff;border:1px solid #ccc;border-radius:5px}.edui-default .edui-wordpastepop .edui-popup-content{border:0;padding:0;width:54px;height:21px}.edui-default .edui-pasteicon{width:100%;height:100%;background-image:url(../images/wordpaste.png);background-position:0 0}.edui-default .edui-pasteicon.edui-state-opened{background-position:0 -34px}.edui-default .edui-pastecontainer{position:relative;visibility:hidden;width:97px;background:#fff;border:1px solid #ccc}.edui-default .edui-pastecontainer .edui-title{font-weight:700;background:#F8F8FF;height:25px;line-height:25px;font-size:12px;padding-left:5px}.edui-default .edui-pastecontainer .edui-button{overflow:hidden;margin:3px 0}.edui-default .edui-pastecontainer .edui-button .edui-richtxticon,.edui-default .edui-pastecontainer .edui-button .edui-tagicon,.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon{float:left;cursor:pointer;width:29px;height:29px;margin-left:5px;background-image:url(../images/wordpaste.png);background-repeat:no-repeat}.edui-default .edui-pastecontainer .edui-button .edui-richtxticon{margin-left:0;background-position:-109px 0}.edui-default .edui-pastecontainer .edui-button .edui-tagicon{background-position:-148px 1px}.edui-default .edui-pastecontainer .edui-button .edui-plaintxticon{background-position:-72px 0}.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-richtxticon{background-position:-109px -34px}.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-tagicon{background-position:-148px -34px}.edui-default .edui-pastecontainer .edui-button .edui-state-hover .edui-plaintxticon{background-position:-72px -34px}
\ No newline at end of file
/*弹出对话框页面样式组件
*/
/*reset
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
outline: 0;
font-size: 100%;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
/*module
*/
body {
background-color: #fff;
font: 12px/1.5 sans-serif, "宋体", "Arial Narrow", HELVETICA;
color: #646464;
}
/*tab*/
.tabhead {
position: relative;
z-index: 10;
}
.tabhead span {
display: inline-block;
padding: 0 5px;
height: 30px;
border: 1px solid #ccc;
background: url("images/dialog-title-bg.png") repeat-x;
text-align: center;
line-height: 30px;
cursor: pointer;
*margin-right: 5px;
}
.tabhead span.focus {
height: 31px;
border-bottom: none;
background: #fff;
}
.tabbody {
position: relative;
top: -1px;
margin: 0 auto;
border: 1px solid #ccc;
}
/*button*/
a.button {
display: block;
text-align: center;
line-height: 24px;
text-decoration: none;
height: 24px;
width: 95px;
border: 0;
color: #838383;
background: url(../../themes/default/images/icons-all.gif) no-repeat;
}
a.button:hover {
background-position: 0 -30px;
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
/**
* ueditor完整配置项
* 可以在这里配置整个编辑器的特性
*/
/**************************提示********************************
* 所有被注释的配置项均为UEditor默认值。
* 修改默认配置请首先确保已经完全明确该参数的真实用途。
* 主要有两种修改方案,一种是取消此处注释,然后修改成对应参数;另一种是在实例化编辑器时传入对应参数。
* 当升级编辑器时,可直接使用旧版配置文件替换新版配置文件,不用担心旧版配置文件中因缺少新功能所需的参数而导致脚本报错。
**************************提示********************************/
(function () {
/**
* 编辑器资源文件根路径。它所表示的含义是:以编辑器实例化页面为当前路径,指向编辑器资源文件(即dialog等文件夹)的路径。
* 鉴于很多同学在使用编辑器的时候出现的种种路径问题,此处强烈建议大家使用"相对于网站根目录的相对路径"进行配置。
* "相对于网站根目录的相对路径"也就是以斜杠开头的形如"/myProject/ueditor/"这样的路径。
* 如果站点中有多个不在同一层级的页面需要实例化编辑器,且引用了同一UEditor的时候,此处的URL可能不适用于每个页面的编辑器。
* 因此,UEditor提供了针对不同页面的编辑器可单独配置的根路径,具体来说,在需要实例化编辑器的页面最顶部写上如下代码即可。当然,需要令此处的URL等于对应的配置。
* window.UEDITOR_HOME_URL = "/xxxx/xxxx/";
*/
var URL = window.UEDITOR_HOME_URL || getUEBasePath();
/**
* 配置项主体。注意,此处所有涉及到路径的配置别遗漏URL变量。
*/
window.UEDITOR_CONFIG = {
//为编辑器实例添加一个路径,这个不能被注释
UEDITOR_HOME_URL: URL
// 服务器统一请求接口路径
, serverUrl: "/ueditor"
//工具栏上的所有的功能按钮和下拉框,可以在new编辑器的实例时选择自己需要的从新定义
, toolbars: [["unlink","link","simpleupload","snapscreen","emotion"]]
//当鼠标放在工具栏上时显示的tooltip提示,留空支持自动多语言配置,否则以配置值为准
//,labelMap:{
// 'anchor':'', 'undo':''
//}
//语言配置项,默认是zh-cn。有需要的话也可以使用如下这样的方式来自动多语言切换,当然,前提条件是lang文件夹下存在对应的语言文件:
//lang值也可以通过自动获取 (navigator.language||navigator.browserLanguage ||navigator.userLanguage).toLowerCase()
//,lang:"zh-cn"
//,langPath:URL +"lang/"
//主题配置项,默认是default。有需要的话也可以使用如下这样的方式来自动多主题切换,当然,前提条件是themes文件夹下存在对应的主题文件:
//现有如下皮肤:default
//,theme:'default'
//,themePath:URL +"themes/"
//,zIndex : 900 //编辑器层级的基数,默认是900
//针对getAllHtml方法,会在对应的head标签中增加该编码设置。
//,charset:"utf-8"
//若实例化编辑器的页面手动修改的domain,此处需要设置为true
//,customDomain:false
//常用配置项目
//,isShow : true //默认显示编辑器
//,textarea:'editorValue' // 提交表单时,服务器获取编辑器提交内容的所用的参数,多实例时可以给容器name属性,会将name给定的值最为每个实例的键值,不用每次实例化的时候都设置这个值
//,initialContent:'欢迎使用ueditor!' //初始化编辑器的内容,也可以通过textarea/script给值,看官网例子
//,autoClearinitialContent:true //是否自动清除编辑器初始内容,注意:如果focus属性设置为true,这个也为真,那么编辑器一上来就会触发导致初始化的内容看不到了
//,focus:false //初始化时,是否让编辑器获得焦点true或false
//如果自定义,最好给p标签如下的行高,要不输入中文时,会有跳动感
//,initialStyle:'p{line-height:1em}'//编辑器层级的基数,可以用来改变字体等
//,iframeCssUrl: URL + '/themes/iframe.css' //给编辑器内部引入一个css文件
//,initialFrameWidth:1000 //初始化编辑器宽度,默认1000
//,initialFrameHeight:320 //初始化编辑器高度,默认320
//,readonly : false //编辑器初始化结束后,编辑区域是否是只读的,默认是false
//,autoClearEmptyNode : true //getContent时,是否删除空的inlineElement节点(包括嵌套的情况)
//,imagePopup:true //图片操作的浮层开关,默认打开
//,emotionLocalization:false //是否开启表情本地化,默认关闭。若要开启请确保emotion文件夹下包含官网提供的images表情文件夹
//粘贴只保留标签,去除标签所有属性
//,retainOnlyLabelPasted: false
//,pasteplain:false //是否默认为纯文本粘贴。false为不使用纯文本粘贴,true为使用纯文本粘贴
//纯文本粘贴模式下的过滤规则
//'filterTxtRules' : function(){
// function transP(node){
// node.tagName = 'p';
// node.setStyle();
// }
// return {
// //直接删除及其字节点内容
// '-' : 'script style object iframe embed input select',
// 'p': {$:{}},
// 'br':{$:{}},
// 'div':{'$':{}},
// 'li':{'$':{}},
// 'caption':transP,
// 'th':transP,
// 'tr':transP,
// 'h1':transP,'h2':transP,'h3':transP,'h4':transP,'h5':transP,'h6':transP,
// 'td':function(node){
// //没有内容的td直接删掉
// var txt = !!node.innerText();
// if(txt){
// node.parentNode.insertAfter(UE.uNode.createText(' &nbsp; &nbsp;'),node);
// }
// node.parentNode.removeChild(node,node.innerText())
// }
// }
//}()
//,allHtmlEnabled:false //提交到后台的数据是否包含整个html字符串
//,autoTransWordToList:false //禁止word中粘贴进来的列表自动变成列表标签
//快捷菜单
//,shortcutMenu:["fontfamily", "fontsize", "bold", "italic", "underline", "forecolor", "backcolor", "insertorderedlist", "insertunorderedlist"]
//tab
//点击tab键时移动的距离,tabSize倍数,tabNode什么字符做为单位
//,tabSize:4
//,tabNode:'&nbsp;'
//scaleEnabled
//是否可以拉伸长高,默认true(当开启时,自动长高失效)
//,scaleEnabled:false
//,minFrameWidth:800 //编辑器拖动时最小宽度,默认800
//,minFrameHeight:220 //编辑器拖动时最小高度,默认220
//iframeUrlMap
//dialog内容的路径 ~会被替换成URL,垓属性一旦打开,将覆盖所有的dialog的默认路径
//,iframeUrlMap:{
// 'anchor':'~/dialogs/anchor/anchor.html',
//}
};
function getUEBasePath(docUrl, confUrl) {
return getBasePath(docUrl || self.document.URL || self.location.href, confUrl || getConfigFilePath());
}
function getConfigFilePath() {
var configPath = document.getElementsByTagName('script');
return configPath[ configPath.length - 1 ].src;
}
function getBasePath(docUrl, confUrl) {
var basePath = confUrl;
if (/^(\/|\\\\)/.test(confUrl)) {
basePath = /^.+?\w(\/|\\\\)/.exec(docUrl)[0] + confUrl.replace(/^(\/|\\\\)/, '');
} else if (!/^[a-z]+:/i.test(confUrl)) {
docUrl = docUrl.split("#")[0].split("?")[0].replace(/[^\\\/]+$/, '');
basePath = docUrl + "" + confUrl;
}
return optimizationPath(basePath);
}
function optimizationPath(path) {
var protocol = /^[a-z]+:\/\//.exec(path)[ 0 ],
tmp = null,
res = [];
path = path.replace(protocol, "").split("?")[0].split("#")[0];
path = path.replace(/\\/g, '/').split(/\//);
path[ path.length - 1 ] = "";
while (path.length) {
if (( tmp = path.shift() ) === "..") {
res.pop();
} else if (tmp !== ".") {
res.push(tmp);
}
}
return protocol + res.join("/");
}
window.UE = {
getUEBasePath: getUEBasePath
};
})();
(function(){
// parse.js
(function(){
UE = window.UE || {};
var isIE = !!window.ActiveXObject;
//定义utils工具
var utils = {
removeLastbs : function(url){
return url.replace(/\/$/,'')
},
extend : function(t,s){
var a = arguments,
notCover = this.isBoolean(a[a.length - 1]) ? a[a.length - 1] : false,
len = this.isBoolean(a[a.length - 1]) ? a.length - 1 : a.length;
for (var i = 1; i < len; i++) {
var x = a[i];
for (var k in x) {
if (!notCover || !t.hasOwnProperty(k)) {
t[k] = x[k];
}
}
}
return t;
},
isIE : isIE,
cssRule : isIE ? function(key,style,doc){
var indexList,index;
doc = doc || document;
if(doc.indexList){
indexList = doc.indexList;
}else{
indexList = doc.indexList = {};
}
var sheetStyle;
if(!indexList[key]){
if(style === undefined){
return ''
}
sheetStyle = doc.createStyleSheet('',index = doc.styleSheets.length);
indexList[key] = index;
}else{
sheetStyle = doc.styleSheets[indexList[key]];
}
if(style === undefined){
return sheetStyle.cssText
}
sheetStyle.cssText = sheetStyle.cssText + '\n' + (style || '')
} : function(key,style,doc){
doc = doc || document;
var head = doc.getElementsByTagName('head')[0],node;
if(!(node = doc.getElementById(key))){
if(style === undefined){
return ''
}
node = doc.createElement('style');
node.id = key;
head.appendChild(node)
}
if(style === undefined){
return node.innerHTML
}
if(style !== ''){
node.innerHTML = node.innerHTML + '\n' + style;
}else{
head.removeChild(node)
}
},
domReady : function (onready) {
var doc = window.document;
if (doc.readyState === "complete") {
onready();
}else{
if (isIE) {
(function () {
if (doc.isReady) return;
try {
doc.documentElement.doScroll("left");
} catch (error) {
setTimeout(arguments.callee, 0);
return;
}
onready();
})();
window.attachEvent('onload', function(){
onready()
});
} else {
doc.addEventListener("DOMContentLoaded", function () {
doc.removeEventListener("DOMContentLoaded", arguments.callee, false);
onready();
}, false);
window.addEventListener('load', function(){onready()}, false);
}
}
},
each : function(obj, iterator, context) {
if (obj == null) return;
if (obj.length === +obj.length) {
for (var i = 0, l = obj.length; i < l; i++) {
if(iterator.call(context, obj[i], i, obj) === false)
return false;
}
} else {
for (var key in obj) {
if (obj.hasOwnProperty(key)) {
if(iterator.call(context, obj[key], key, obj) === false)
return false;
}
}
}
},
inArray : function(arr,item){
var index = -1;
this.each(arr,function(v,i){
if(v === item){
index = i;
return false;
}
});
return index;
},
pushItem : function(arr,item){
if(this.inArray(arr,item)==-1){
arr.push(item)
}
},
trim: function (str) {
return str.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g, '');
},
indexOf: function (array, item, start) {
var index = -1;
start = this.isNumber(start) ? start : 0;
this.each(array, function (v, i) {
if (i >= start && v === item) {
index = i;
return false;
}
});
return index;
},
hasClass: function (element, className) {
className = className.replace(/(^[ ]+)|([ ]+$)/g, '').replace(/[ ]{2,}/g, ' ').split(' ');
for (var i = 0, ci, cls = element.className; ci = className[i++];) {
if (!new RegExp('\\b' + ci + '\\b', 'i').test(cls)) {
return false;
}
}
return i - 1 == className.length;
},
addClass:function (elm, classNames) {
if(!elm)return;
classNames = this.trim(classNames).replace(/[ ]{2,}/g,' ').split(' ');
for(var i = 0,ci,cls = elm.className;ci=classNames[i++];){
if(!new RegExp('\\b' + ci + '\\b').test(cls)){
cls += ' ' + ci;
}
}
elm.className = utils.trim(cls);
},
removeClass:function (elm, classNames) {
classNames = this.isArray(classNames) ? classNames :
this.trim(classNames).replace(/[ ]{2,}/g,' ').split(' ');
for(var i = 0,ci,cls = elm.className;ci=classNames[i++];){
cls = cls.replace(new RegExp('\\b' + ci + '\\b'),'')
}
cls = this.trim(cls).replace(/[ ]{2,}/g,' ');
elm.className = cls;
!cls && elm.removeAttribute('className');
},
on: function (element, type, handler) {
var types = this.isArray(type) ? type : type.split(/\s+/),
k = types.length;
if (k) while (k--) {
type = types[k];
if (element.addEventListener) {
element.addEventListener(type, handler, false);
} else {
if (!handler._d) {
handler._d = {
els : []
};
}
var key = type + handler.toString(),index = utils.indexOf(handler._d.els,element);
if (!handler._d[key] || index == -1) {
if(index == -1){
handler._d.els.push(element);
}
if(!handler._d[key]){
handler._d[key] = function (evt) {
return handler.call(evt.srcElement, evt || window.event);
};
}
element.attachEvent('on' + type, handler._d[key]);
}
}
}
element = null;
},
off: function (element, type, handler) {
var types = this.isArray(type) ? type : type.split(/\s+/),
k = types.length;
if (k) while (k--) {
type = types[k];
if (element.removeEventListener) {
element.removeEventListener(type, handler, false);
} else {
var key = type + handler.toString();
try{
element.detachEvent('on' + type, handler._d ? handler._d[key] : handler);
}catch(e){}
if (handler._d && handler._d[key]) {
var index = utils.indexOf(handler._d.els,element);
if(index!=-1){
handler._d.els.splice(index,1);
}
handler._d.els.length == 0 && delete handler._d[key];
}
}
}
},
loadFile : function () {
var tmpList = [];
function getItem(doc,obj){
try{
for(var i= 0,ci;ci=tmpList[i++];){
if(ci.doc === doc && ci.url == (obj.src || obj.href)){
return ci;
}
}
}catch(e){
return null;
}
}
return function (doc, obj, fn) {
var item = getItem(doc,obj);
if (item) {
if(item.ready){
fn && fn();
}else{
item.funs.push(fn)
}
return;
}
tmpList.push({
doc:doc,
url:obj.src||obj.href,
funs:[fn]
});
if (!doc.body) {
var html = [];
for(var p in obj){
if(p == 'tag')continue;
html.push(p + '="' + obj[p] + '"')
}
doc.write('<' + obj.tag + ' ' + html.join(' ') + ' ></'+obj.tag+'>');
return;
}
if (obj.id && doc.getElementById(obj.id)) {
return;
}
var element = doc.createElement(obj.tag);
delete obj.tag;
for (var p in obj) {
element.setAttribute(p, obj[p]);
}
element.onload = element.onreadystatechange = function () {
if (!this.readyState || /loaded|complete/.test(this.readyState)) {
item = getItem(doc,obj);
if (item.funs.length > 0) {
item.ready = 1;
for (var fi; fi = item.funs.pop();) {
fi();
}
}
element.onload = element.onreadystatechange = null;
}
};
element.onerror = function(){
throw Error('The load '+(obj.href||obj.src)+' fails,check the url')
};
doc.getElementsByTagName("head")[0].appendChild(element);
}
}()
};
utils.each(['String', 'Function', 'Array', 'Number', 'RegExp', 'Object','Boolean'], function (v) {
utils['is' + v] = function (obj) {
return Object.prototype.toString.apply(obj) == '[object ' + v + ']';
}
});
var parselist = {};
UE.parse = {
register : function(parseName,fn){
parselist[parseName] = fn;
},
load : function(opt){
utils.each(parselist,function(v){
v.call(opt,utils);
})
}
};
uParse = function(selector,opt){
utils.domReady(function(){
var contents;
if(document.querySelectorAll){
contents = document.querySelectorAll(selector)
}else{
if(/^#/.test(selector)){
contents = [document.getElementById(selector.replace(/^#/,''))]
}else if(/^\./.test(selector)){
var contents = [];
utils.each(document.getElementsByTagName('*'),function(node){
if(node.className && new RegExp('\\b' + selector.replace(/^\./,'') + '\\b','i').test(node.className)){
contents.push(node)
}
})
}else{
contents = document.getElementsByTagName(selector)
}
}
utils.each(contents,function(v){
UE.parse.load(utils.extend({root:v,selector:selector},opt))
})
})
}
})();
})();
\ No newline at end of file
!function(){!function(){UE=window.UE||{};var isIE=!!window.ActiveXObject;var utils={removeLastbs:function(url){return url.replace(/\/$/,"")},extend:function(t,s){var a=arguments,notCover=this.isBoolean(a[a.length-1])?a[a.length-1]:false,len=this.isBoolean(a[a.length-1])?a.length-1:a.length;for(var i=1;i<len;i++){var x=a[i];for(var k in x){if(!notCover||!t.hasOwnProperty(k)){t[k]=x[k]}}}return t},isIE:isIE,cssRule:isIE?function(key,style,doc){var indexList,index;doc=doc||document;if(doc.indexList){indexList=doc.indexList}else{indexList=doc.indexList={}}var sheetStyle;if(!indexList[key]){if(style===undefined){return""}sheetStyle=doc.createStyleSheet("",index=doc.styleSheets.length);indexList[key]=index}else{sheetStyle=doc.styleSheets[indexList[key]]}if(style===undefined){return sheetStyle.cssText}sheetStyle.cssText=sheetStyle.cssText+"\n"+(style||"")}:function(key,style,doc){doc=doc||document;var head=doc.getElementsByTagName("head")[0],node;if(!(node=doc.getElementById(key))){if(style===undefined){return""}node=doc.createElement("style");node.id=key;head.appendChild(node)}if(style===undefined){return node.innerHTML}if(style!==""){node.innerHTML=node.innerHTML+"\n"+style}else{head.removeChild(node)}},domReady:function(onready){var doc=window.document;if(doc.readyState==="complete"){onready()}else{if(isIE){!function(){if(doc.isReady)return;try{doc.documentElement.doScroll("left")}catch(error){setTimeout(arguments.callee,0);return}onready()}();window.attachEvent("onload",function(){onready()})}else{doc.addEventListener("DOMContentLoaded",function(){doc.removeEventListener("DOMContentLoaded",arguments.callee,false);onready()},false);window.addEventListener("load",function(){onready()},false)}}},each:function(obj,iterator,context){if(obj==null)return;if(obj.length===+obj.length){for(var i=0,l=obj.length;i<l;i++){if(iterator.call(context,obj[i],i,obj)===false)return false}}else{for(var key in obj){if(obj.hasOwnProperty(key)){if(iterator.call(context,obj[key],key,obj)===false)return false}}}},inArray:function(arr,item){var index=-1;this.each(arr,function(v,i){if(v===item){index=i;return false}});return index},pushItem:function(arr,item){if(this.inArray(arr,item)==-1){arr.push(item)}},trim:function(str){return str.replace(/(^[ \t\n\r]+)|([ \t\n\r]+$)/g,"")},indexOf:function(array,item,start){var index=-1;start=this.isNumber(start)?start:0;this.each(array,function(v,i){if(i>=start&&v===item){index=i;return false}});return index},hasClass:function(element,className){className=className.replace(/(^[ ]+)|([ ]+$)/g,"").replace(/[ ]{2,}/g," ").split(" ");for(var i=0,ci,cls=element.className;ci=className[i++];){if(!new RegExp("\\b"+ci+"\\b","i").test(cls)){return false}}return i-1==className.length},addClass:function(elm,classNames){if(!elm)return;classNames=this.trim(classNames).replace(/[ ]{2,}/g," ").split(" ");for(var i=0,ci,cls=elm.className;ci=classNames[i++];){if(!new RegExp("\\b"+ci+"\\b").test(cls)){cls+=" "+ci}}elm.className=utils.trim(cls)},removeClass:function(elm,classNames){classNames=this.isArray(classNames)?classNames:this.trim(classNames).replace(/[ ]{2,}/g," ").split(" ");for(var i=0,ci,cls=elm.className;ci=classNames[i++];){cls=cls.replace(new RegExp("\\b"+ci+"\\b"),"")}cls=this.trim(cls).replace(/[ ]{2,}/g," ");elm.className=cls;!cls&&elm.removeAttribute("className")},on:function(element,type,handler){var types=this.isArray(type)?type:type.split(/\s+/),k=types.length;if(k)while(k--){type=types[k];if(element.addEventListener){element.addEventListener(type,handler,false)}else{if(!handler._d){handler._d={els:[]}}var key=type+handler.toString(),index=utils.indexOf(handler._d.els,element);if(!handler._d[key]||index==-1){if(index==-1){handler._d.els.push(element)}if(!handler._d[key]){handler._d[key]=function(evt){return handler.call(evt.srcElement,evt||window.event)}}element.attachEvent("on"+type,handler._d[key])}}}element=null},off:function(element,type,handler){var types=this.isArray(type)?type:type.split(/\s+/),k=types.length;if(k)while(k--){type=types[k];if(element.removeEventListener){element.removeEventListener(type,handler,false)}else{var key=type+handler.toString();try{element.detachEvent("on"+type,handler._d?handler._d[key]:handler)}catch(e){}if(handler._d&&handler._d[key]){var index=utils.indexOf(handler._d.els,element);if(index!=-1){handler._d.els.splice(index,1)}handler._d.els.length==0&&delete handler._d[key]}}}},loadFile:function(){var tmpList=[];function getItem(doc,obj){try{for(var i=0,ci;ci=tmpList[i++];){if(ci.doc===doc&&ci.url==(obj.src||obj.href)){return ci}}}catch(e){return null}}return function(doc,obj,fn){var item=getItem(doc,obj);if(item){if(item.ready){fn&&fn()}else{item.funs.push(fn)}return}tmpList.push({doc:doc,url:obj.src||obj.href,funs:[fn]});if(!doc.body){var html=[];for(var p in obj){if(p=="tag")continue;html.push(p+'="'+obj[p]+'"')}doc.write("<"+obj.tag+" "+html.join(" ")+" ></"+obj.tag+">");return}if(obj.id&&doc.getElementById(obj.id)){return}var element=doc.createElement(obj.tag);delete obj.tag;for(var p in obj){element.setAttribute(p,obj[p])}element.onload=element.onreadystatechange=function(){if(!this.readyState||/loaded|complete/.test(this.readyState)){item=getItem(doc,obj);if(item.funs.length>0){item.ready=1;for(var fi;fi=item.funs.pop();){fi()}}element.onload=element.onreadystatechange=null}};element.onerror=function(){throw Error("The load "+(obj.href||obj.src)+" fails,check the url")};doc.getElementsByTagName("head")[0].appendChild(element)}}()};utils.each(["String","Function","Array","Number","RegExp","Object","Boolean"],function(v){utils["is"+v]=function(obj){return Object.prototype.toString.apply(obj)=="[object "+v+"]"}});var parselist={};UE.parse={register:function(parseName,fn){parselist[parseName]=fn},load:function(opt){utils.each(parselist,function(v){v.call(opt,utils)})}};uParse=function(selector,opt){utils.domReady(function(){var contents;if(document.querySelectorAll){contents=document.querySelectorAll(selector)}else{if(/^#/.test(selector)){contents=[document.getElementById(selector.replace(/^#/,""))]}else if(/^\./.test(selector)){var contents=[];utils.each(document.getElementsByTagName("*"),function(node){if(node.className&&new RegExp("\\b"+selector.replace(/^\./,"")+"\\b","i").test(node.className)){contents.push(node)}})}else{contents=document.getElementsByTagName(selector)}}utils.each(contents,function(v){UE.parse.load(utils.extend({root:v,selector:selector},opt))})})}}()}();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment