umeditor-rails 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +31 -0
- data/Rakefile +2 -0
- data/app/assets/javascripts/umeditor.js +2 -0
- data/lib/tasks/umeditor.rake +12 -0
- data/lib/umeditor/rails/engine.rb +20 -0
- data/lib/umeditor/rails/version.rb +6 -0
- data/lib/umeditor/rails.rb +7 -0
- data/lib/umeditor-rails.rb +1 -0
- data/umeditor-rails.gemspec +23 -0
- data/vendor/assets/javascripts/umeditor/dialogs/emotion/emotion.css +87 -0
- data/vendor/assets/javascripts/umeditor/dialogs/emotion/emotion.js +272 -0
- data/vendor/assets/javascripts/umeditor/dialogs/emotion/images/0.gif +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/emotion/images/bface.gif +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/emotion/images/cface.gif +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/emotion/images/fface.gif +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/emotion/images/jxface2.gif +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/emotion/images/neweditor-tab-bg.png +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/emotion/images/tface.gif +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/emotion/images/wface.gif +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/emotion/images/yface.gif +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/formula/formula.css +32 -0
- data/vendor/assets/javascripts/umeditor/dialogs/formula/formula.html +212 -0
- data/vendor/assets/javascripts/umeditor/dialogs/formula/formula.js +124 -0
- data/vendor/assets/javascripts/umeditor/dialogs/formula/images/formula.png +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/image/image.css +42 -0
- data/vendor/assets/javascripts/umeditor/dialogs/image/image.js +445 -0
- data/vendor/assets/javascripts/umeditor/dialogs/image/images/close.png +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/image/images/upload1.png +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/image/images/upload2.png +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/link/link.js +73 -0
- data/vendor/assets/javascripts/umeditor/dialogs/map/map.html +148 -0
- data/vendor/assets/javascripts/umeditor/dialogs/map/map.js +263 -0
- data/vendor/assets/javascripts/umeditor/dialogs/video/images/center_focus.jpg +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/video/images/left_focus.jpg +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/video/images/none_focus.jpg +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/video/images/right_focus.jpg +0 -0
- data/vendor/assets/javascripts/umeditor/dialogs/video/video.css +59 -0
- data/vendor/assets/javascripts/umeditor/dialogs/video/video.js +282 -0
- data/vendor/assets/javascripts/umeditor/index.html +277 -0
- data/vendor/assets/javascripts/umeditor/lang/en/en.js +150 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/addimage.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/alldeletebtnhoverskin.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/alldeletebtnupskin.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/background.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/button.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/copy.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/deletedisable.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/deleteenable.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/imglabel.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/listbackground.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/localimage.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/music.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/rotateleftdisable.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/rotateleftenable.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/rotaterightdisable.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/rotaterightenable.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/en/images/upload.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/zh-cn/images/copy.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/zh-cn/images/imglabel.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/zh-cn/images/localimage.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/zh-cn/images/music.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/zh-cn/images/upload.png +0 -0
- data/vendor/assets/javascripts/umeditor/lang/zh-cn/zh-cn.js +150 -0
- data/vendor/assets/javascripts/umeditor/themes/default/css/umeditor.css +773 -0
- data/vendor/assets/javascripts/umeditor/themes/default/css/umeditor.min.css +8 -0
- data/vendor/assets/javascripts/umeditor/themes/default/images/caret.png +0 -0
- data/vendor/assets/javascripts/umeditor/themes/default/images/close.png +0 -0
- data/vendor/assets/javascripts/umeditor/themes/default/images/icons.gif +0 -0
- data/vendor/assets/javascripts/umeditor/themes/default/images/icons.png +0 -0
- data/vendor/assets/javascripts/umeditor/themes/default/images/ok.gif +0 -0
- data/vendor/assets/javascripts/umeditor/themes/default/images/pop-bg.png +0 -0
- data/vendor/assets/javascripts/umeditor/themes/default/images/spacer.gif +0 -0
- data/vendor/assets/javascripts/umeditor/themes/default/images/videologo.gif +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/jquery.min.js +6 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/Symbola.eot +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/Symbola.otf +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/Symbola.svg +5102 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/Symbola.ttf +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/Symbola.woff +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/STIXFontLicense2010.txt +103 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.eot +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.svg +3318 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.ttf +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneral-webfont.woff +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.eot +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.svg +1738 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.ttf +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbol-webfont.woff +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.eot +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.svg +1137 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.ttf +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralbolita-webfont.woff +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.eot +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.svg +1089 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.ttf +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/font/stixgeneral-bundle/stixgeneralitalic-webfont.woff +0 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/mathquill.css +357 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/mathquill.js +3888 -0
- data/vendor/assets/javascripts/umeditor/third-party/mathquill/mathquill.min.js +2 -0
- data/vendor/assets/javascripts/umeditor/umeditor.config.js +249 -0
- data/vendor/assets/javascripts/umeditor/umeditor.js +10923 -0
- data/vendor/assets/javascripts/umeditor/umeditor.min.js +264 -0
- metadata +178 -0
@@ -0,0 +1,277 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
|
5
|
+
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
|
6
|
+
<title>UMEDITOR 完整demo</title>
|
7
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
8
|
+
<link href="themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
|
9
|
+
<script type="text/javascript" src="third-party/jquery.min.js"></script>
|
10
|
+
<script type="text/javascript" charset="utf-8" src="umeditor.config.js"></script>
|
11
|
+
<script type="text/javascript" charset="utf-8" src="umeditor.min.js"></script>
|
12
|
+
<script type="text/javascript" src="lang/zh-cn/zh-cn.js"></script>
|
13
|
+
<style type="text/css">
|
14
|
+
h1{
|
15
|
+
font-family: "微软雅黑";
|
16
|
+
font-weight: normal;
|
17
|
+
}
|
18
|
+
.btn {
|
19
|
+
display: inline-block;
|
20
|
+
*display: inline;
|
21
|
+
padding: 4px 12px;
|
22
|
+
margin-bottom: 0;
|
23
|
+
*margin-left: .3em;
|
24
|
+
font-size: 14px;
|
25
|
+
line-height: 20px;
|
26
|
+
color: #333333;
|
27
|
+
text-align: center;
|
28
|
+
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
29
|
+
vertical-align: middle;
|
30
|
+
cursor: pointer;
|
31
|
+
background-color: #f5f5f5;
|
32
|
+
*background-color: #e6e6e6;
|
33
|
+
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
|
34
|
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
|
35
|
+
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
|
36
|
+
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
|
37
|
+
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
|
38
|
+
background-repeat: repeat-x;
|
39
|
+
border: 1px solid #cccccc;
|
40
|
+
*border: 0;
|
41
|
+
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
|
42
|
+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
43
|
+
border-bottom-color: #b3b3b3;
|
44
|
+
-webkit-border-radius: 4px;
|
45
|
+
-moz-border-radius: 4px;
|
46
|
+
border-radius: 4px;
|
47
|
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
|
48
|
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
49
|
+
*zoom: 1;
|
50
|
+
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
51
|
+
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
52
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
53
|
+
}
|
54
|
+
|
55
|
+
.btn:hover,
|
56
|
+
.btn:focus,
|
57
|
+
.btn:active,
|
58
|
+
.btn.active,
|
59
|
+
.btn.disabled,
|
60
|
+
.btn[disabled] {
|
61
|
+
color: #333333;
|
62
|
+
background-color: #e6e6e6;
|
63
|
+
*background-color: #d9d9d9;
|
64
|
+
}
|
65
|
+
|
66
|
+
.btn:active,
|
67
|
+
.btn.active {
|
68
|
+
background-color: #cccccc \9;
|
69
|
+
}
|
70
|
+
|
71
|
+
.btn:first-child {
|
72
|
+
*margin-left: 0;
|
73
|
+
}
|
74
|
+
|
75
|
+
.btn:hover,
|
76
|
+
.btn:focus {
|
77
|
+
color: #333333;
|
78
|
+
text-decoration: none;
|
79
|
+
background-position: 0 -15px;
|
80
|
+
-webkit-transition: background-position 0.1s linear;
|
81
|
+
-moz-transition: background-position 0.1s linear;
|
82
|
+
-o-transition: background-position 0.1s linear;
|
83
|
+
transition: background-position 0.1s linear;
|
84
|
+
}
|
85
|
+
|
86
|
+
.btn:focus {
|
87
|
+
outline: thin dotted #333;
|
88
|
+
outline: 5px auto -webkit-focus-ring-color;
|
89
|
+
outline-offset: -2px;
|
90
|
+
}
|
91
|
+
|
92
|
+
.btn.active,
|
93
|
+
.btn:active {
|
94
|
+
background-image: none;
|
95
|
+
outline: 0;
|
96
|
+
-webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
97
|
+
-moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
98
|
+
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
|
99
|
+
}
|
100
|
+
|
101
|
+
.btn.disabled,
|
102
|
+
.btn[disabled] {
|
103
|
+
cursor: default;
|
104
|
+
background-image: none;
|
105
|
+
opacity: 0.65;
|
106
|
+
filter: alpha(opacity=65);
|
107
|
+
-webkit-box-shadow: none;
|
108
|
+
-moz-box-shadow: none;
|
109
|
+
box-shadow: none;
|
110
|
+
}
|
111
|
+
</style>
|
112
|
+
</head>
|
113
|
+
<body>
|
114
|
+
<h1>UMEDITOR 完整demo</h1>
|
115
|
+
|
116
|
+
<!--style给定宽度可以影响编辑器的最终宽度-->
|
117
|
+
<script type="text/plain" id="myEditor" style="width:1000px;height:240px;">
|
118
|
+
<p>这里我可以写一些输入提示</p>
|
119
|
+
</script>
|
120
|
+
|
121
|
+
|
122
|
+
<div class="clear"></div>
|
123
|
+
<div id="btns">
|
124
|
+
<table>
|
125
|
+
<tr>
|
126
|
+
<td>
|
127
|
+
<button class="btn" unselected="on" onclick="getAllHtml()">获得整个html的内容</button>
|
128
|
+
<button class="btn" onclick="getContent()">获得内容</button>
|
129
|
+
<button class="btn" onclick="setContent()">写入内容</button>
|
130
|
+
<button class="btn" onclick="setContent(true)">追加内容</button>
|
131
|
+
<button class="btn" onclick="getContentTxt()">获得纯文本</button>
|
132
|
+
<button class="btn" onclick="getPlainTxt()">获得带格式的纯文本</button>
|
133
|
+
<button class="btn" onclick="hasContent()">判断是否有内容</button>
|
134
|
+
</td>
|
135
|
+
</tr>
|
136
|
+
<tr>
|
137
|
+
<td>
|
138
|
+
<button class="btn" onclick="setFocus()">编辑器获得焦点</button>
|
139
|
+
<button class="btn" onmousedown="isFocus();return false;">编辑器是否获得焦点</button>
|
140
|
+
<button class="btn" onclick="doBlur()">编辑器取消焦点</button>
|
141
|
+
<button class="btn" onclick="insertHtml()">插入给定的内容</button>
|
142
|
+
<button class="btn" onclick="getContentTxt()">获得纯文本</button>
|
143
|
+
<button class="btn" id="enable" onclick="setEnabled()">可以编辑</button>
|
144
|
+
<button class="btn" onclick="setDisabled()">不可编辑</button>
|
145
|
+
</td>
|
146
|
+
</tr>
|
147
|
+
<tr>
|
148
|
+
<td>
|
149
|
+
<button class="btn" onclick="UM.getEditor('myEditor').setHide()">隐藏编辑器</button>
|
150
|
+
<button class="btn" onclick="UM.getEditor('myEditor').setShow()">显示编辑器</button>
|
151
|
+
<button class="btn" onclick="UM.getEditor('myEditor').setHeight(300)">设置编辑器的高度为300</button>
|
152
|
+
<button class="btn" onclick="UM.getEditor('myEditor').setWidth(1200)">设置编辑器的宽度为1200</button>
|
153
|
+
</td>
|
154
|
+
</tr>
|
155
|
+
|
156
|
+
</table>
|
157
|
+
</div>
|
158
|
+
<table>
|
159
|
+
<tr>
|
160
|
+
<td>
|
161
|
+
<button class="btn" onclick="createEditor()"/>创建编辑器</button>
|
162
|
+
<button class="btn" onclick="deleteEditor()"/>删除编辑器</button>
|
163
|
+
</td>
|
164
|
+
</tr>
|
165
|
+
</table>
|
166
|
+
|
167
|
+
<div>
|
168
|
+
<h3 id="focush2"></h3>
|
169
|
+
</div>
|
170
|
+
<script type="text/javascript">
|
171
|
+
//实例化编辑器
|
172
|
+
var um = UM.getEditor('myEditor');
|
173
|
+
um.addListener('blur',function(){
|
174
|
+
$('#focush2').html('编辑器失去焦点了')
|
175
|
+
});
|
176
|
+
um.addListener('focus',function(){
|
177
|
+
$('#focush2').html('')
|
178
|
+
});
|
179
|
+
//按钮的操作
|
180
|
+
function insertHtml() {
|
181
|
+
var value = prompt('插入html代码', '');
|
182
|
+
um.execCommand('insertHtml', value)
|
183
|
+
}
|
184
|
+
function isFocus(){
|
185
|
+
alert(um.isFocus())
|
186
|
+
}
|
187
|
+
function doBlur(){
|
188
|
+
um.blur()
|
189
|
+
}
|
190
|
+
function createEditor() {
|
191
|
+
enableBtn();
|
192
|
+
um = UM.getEditor('myEditor');
|
193
|
+
}
|
194
|
+
function getAllHtml() {
|
195
|
+
alert(UM.getEditor('myEditor').getAllHtml())
|
196
|
+
}
|
197
|
+
function getContent() {
|
198
|
+
var arr = [];
|
199
|
+
arr.push("使用editor.getContent()方法可以获得编辑器的内容");
|
200
|
+
arr.push("内容为:");
|
201
|
+
arr.push(UM.getEditor('myEditor').getContent());
|
202
|
+
alert(arr.join("\n"));
|
203
|
+
}
|
204
|
+
function getPlainTxt() {
|
205
|
+
var arr = [];
|
206
|
+
arr.push("使用editor.getPlainTxt()方法可以获得编辑器的带格式的纯文本内容");
|
207
|
+
arr.push("内容为:");
|
208
|
+
arr.push(UM.getEditor('myEditor').getPlainTxt());
|
209
|
+
alert(arr.join('\n'))
|
210
|
+
}
|
211
|
+
function setContent(isAppendTo) {
|
212
|
+
var arr = [];
|
213
|
+
arr.push("使用editor.setContent('欢迎使用umeditor')方法可以设置编辑器的内容");
|
214
|
+
UM.getEditor('myEditor').setContent('欢迎使用umeditor', isAppendTo);
|
215
|
+
alert(arr.join("\n"));
|
216
|
+
}
|
217
|
+
function setDisabled() {
|
218
|
+
UM.getEditor('myEditor').setDisabled('fullscreen');
|
219
|
+
disableBtn("enable");
|
220
|
+
}
|
221
|
+
|
222
|
+
function setEnabled() {
|
223
|
+
UM.getEditor('myEditor').setEnabled();
|
224
|
+
enableBtn();
|
225
|
+
}
|
226
|
+
|
227
|
+
function getText() {
|
228
|
+
//当你点击按钮时编辑区域已经失去了焦点,如果直接用getText将不会得到内容,所以要在选回来,然后取得内容
|
229
|
+
var range = UM.getEditor('myEditor').selection.getRange();
|
230
|
+
range.select();
|
231
|
+
var txt = UM.getEditor('myEditor').selection.getText();
|
232
|
+
alert(txt)
|
233
|
+
}
|
234
|
+
|
235
|
+
function getContentTxt() {
|
236
|
+
var arr = [];
|
237
|
+
arr.push("使用editor.getContentTxt()方法可以获得编辑器的纯文本内容");
|
238
|
+
arr.push("编辑器的纯文本内容为:");
|
239
|
+
arr.push(UM.getEditor('myEditor').getContentTxt());
|
240
|
+
alert(arr.join("\n"));
|
241
|
+
}
|
242
|
+
function hasContent() {
|
243
|
+
var arr = [];
|
244
|
+
arr.push("使用editor.hasContents()方法判断编辑器里是否有内容");
|
245
|
+
arr.push("判断结果为:");
|
246
|
+
arr.push(UM.getEditor('myEditor').hasContents());
|
247
|
+
alert(arr.join("\n"));
|
248
|
+
}
|
249
|
+
function setFocus() {
|
250
|
+
UM.getEditor('myEditor').focus();
|
251
|
+
}
|
252
|
+
function deleteEditor() {
|
253
|
+
disableBtn();
|
254
|
+
UM.getEditor('myEditor').destroy();
|
255
|
+
}
|
256
|
+
function disableBtn(str) {
|
257
|
+
var div = document.getElementById('btns');
|
258
|
+
var btns = domUtils.getElementsByTagName(div, "button");
|
259
|
+
for (var i = 0, btn; btn = btns[i++];) {
|
260
|
+
if (btn.id == str) {
|
261
|
+
domUtils.removeAttributes(btn, ["disabled"]);
|
262
|
+
} else {
|
263
|
+
btn.setAttribute("disabled", "true");
|
264
|
+
}
|
265
|
+
}
|
266
|
+
}
|
267
|
+
function enableBtn() {
|
268
|
+
var div = document.getElementById('btns');
|
269
|
+
var btns = domUtils.getElementsByTagName(div, "button");
|
270
|
+
for (var i = 0, btn; btn = btns[i++];) {
|
271
|
+
domUtils.removeAttributes(btn, ["disabled"]);
|
272
|
+
}
|
273
|
+
}
|
274
|
+
</script>
|
275
|
+
|
276
|
+
</body>
|
277
|
+
</html>
|
@@ -0,0 +1,150 @@
|
|
1
|
+
/**
|
2
|
+
* English language package
|
3
|
+
*/
|
4
|
+
UM.I18N['en'] = {
|
5
|
+
'labelMap':{
|
6
|
+
'anchor':'Anchor', 'undo':'Undo', 'redo':'Redo', 'bold':'Bold', 'indent':'Indent', 'snapscreen':'SnapScreen',
|
7
|
+
'italic':'Italic', 'underline':'Underline', 'strikethrough':'Strikethrough', 'subscript':'SubScript','fontborder':'text border',
|
8
|
+
'superscript':'SuperScript', 'formatmatch':'Format Match', 'source':'Source', 'blockquote':'BlockQuote',
|
9
|
+
'pasteplain':'PastePlain', 'selectall':'SelectAll', 'print':'Print', 'preview':'Preview',
|
10
|
+
'horizontal':'Horizontal', 'removeformat':'RemoveFormat', 'time':'Time', 'date':'Date',
|
11
|
+
'unlink':'Unlink', 'insertrow':'InsertRow', 'insertcol':'InsertCol', 'mergeright':'MergeRight', 'mergedown':'MergeDown',
|
12
|
+
'deleterow':'DeleteRow', 'deletecol':'DeleteCol', 'splittorows':'SplitToRows','insertcode':'insert code',
|
13
|
+
'splittocols':'SplitToCols', 'splittocells':'SplitToCells','deletecaption':'DeleteCaption','inserttitle':'InsertTitle',
|
14
|
+
'mergecells':'MergeCells', 'deletetable':'DeleteTable', 'cleardoc':'Clear', 'insertparagraphbeforetable':"InsertParagraphBeforeTable",
|
15
|
+
'fontfamily':'FontFamily', 'fontsize':'FontSize', 'paragraph':'Paragraph', 'image':'Image','edittable':'Edit Table', 'edittd':'Edit Td','link':'Link',
|
16
|
+
'emotion':'Emotion', 'spechars':'Spechars', 'searchreplace':'SearchReplace', 'map':'BaiduMap', 'gmap':'GoogleMap',
|
17
|
+
'video':'Video', 'help':'Help', 'justifyleft':'JustifyLeft', 'justifyright':'JustifyRight', 'justifycenter':'JustifyCenter',
|
18
|
+
'justifyjustify':'Justify', 'forecolor':'FontColor', 'backcolor':'BackColor', 'insertorderedlist':'OL',
|
19
|
+
'insertunorderedlist':'UL', 'fullscreen':'FullScreen', 'directionalityltr':'EnterFromLeft', 'directionalityrtl':'EnterFromRight',
|
20
|
+
'rowspacingtop':'RowSpacingTop', 'rowspacingbottom':'RowSpacingBottom', 'highlightcode':'Code', 'pagebreak':'PageBreak', 'insertframe':'Iframe', 'imagenone':'Default',
|
21
|
+
'imageleft':'ImageLeft', 'imageright':'ImageRight', 'attachment':'Attachment', 'imagecenter':'ImageCenter', 'wordimage':'WordImage',
|
22
|
+
'lineheight':'LineHeight','edittip':'EditTip','customstyle':'CustomStyle', 'scrawl':'Scrawl', 'autotypeset':'AutoTypeset',
|
23
|
+
'webapp':'WebAPP', 'touppercase':'UpperCase', 'tolowercase':'LowerCase','template':'Template','background':'Background','inserttable':'InsertTable',
|
24
|
+
'drafts': 'drafts', 'formula':'formula'
|
25
|
+
},
|
26
|
+
'paragraph':{'p':'Paragraph', 'h1':'Title 1', 'h2':'Title 2', 'h3':'Title 3', 'h4':'Title 4', 'h5':'Title 5', 'h6':'Title 6'},
|
27
|
+
'fontfamily':{
|
28
|
+
'songti':'Sim sun',
|
29
|
+
'kaiti':'Sim kai',
|
30
|
+
'heiti':'Sim hei',
|
31
|
+
'lishu':'Sim li',
|
32
|
+
'yahei': 'Microsoft yahei',
|
33
|
+
'andaleMono':'Andale mono',
|
34
|
+
'arial': 'Arial',
|
35
|
+
'arialBlack':'Arial black',
|
36
|
+
'comicSansMs':'Comic sans ms',
|
37
|
+
'impact':'Impact',
|
38
|
+
'timesNewRoman':'Times new roman'
|
39
|
+
},
|
40
|
+
'ok':"OK",
|
41
|
+
'cancel':"Cancel",
|
42
|
+
'closeDialog':"closeDialog",
|
43
|
+
'tableDrag':"You must import the file uiUtils.js before drag! ",
|
44
|
+
'autofloatMsg':"The plugin AutoFloat depends on EditorUI!",
|
45
|
+
'anthorMsg':"Link",
|
46
|
+
'clearColor':'Clear',
|
47
|
+
'standardColor':'Standard color',
|
48
|
+
'themeColor':'Theme color',
|
49
|
+
'property':'Property',
|
50
|
+
'default':'Default',
|
51
|
+
'modify':'Modify',
|
52
|
+
'justifyleft':'Justify Left',
|
53
|
+
'justifyright':'Justify Right',
|
54
|
+
'justifycenter':'Justify Center',
|
55
|
+
'justify':'Default',
|
56
|
+
'clear':'Clear',
|
57
|
+
'anchorMsg':'Anchor',
|
58
|
+
'delete':'Delete',
|
59
|
+
'clickToUpload':"Click to upload",
|
60
|
+
'unset':"Language hasn't been set!",
|
61
|
+
't_row':'row',
|
62
|
+
't_col':'col',
|
63
|
+
'more':'More',
|
64
|
+
'pasteOpt':'Paste Option',
|
65
|
+
'pasteSourceFormat':"Keep Source Formatting",
|
66
|
+
'tagFormat':'Keep tag',
|
67
|
+
'pasteTextFormat':'Keep Text only',
|
68
|
+
|
69
|
+
//===============dialog i18N=======================
|
70
|
+
'image':{
|
71
|
+
'static':{
|
72
|
+
'lang_tab_local':"Local Upload",
|
73
|
+
'lang_tab_imgSearch':"Network Pictures",
|
74
|
+
'lang_input_dragTip':"Support drag upload",
|
75
|
+
'lang_btn_add':"Add"
|
76
|
+
},
|
77
|
+
'uploadError': 'Upload Error'
|
78
|
+
},
|
79
|
+
'emotion':{
|
80
|
+
'static':{
|
81
|
+
'lang_input_choice':'Choice',
|
82
|
+
'lang_input_Tuzki':'Tuzki',
|
83
|
+
'lang_input_lvdouwa':'LvDouWa',
|
84
|
+
'lang_input_BOBO':'BOBO',
|
85
|
+
'lang_input_babyCat':'BabyCat',
|
86
|
+
'lang_input_bubble':'Bubble',
|
87
|
+
'lang_input_youa':'YouA'
|
88
|
+
}
|
89
|
+
},
|
90
|
+
'gmap':{
|
91
|
+
'static':{
|
92
|
+
'lang_input_address':'Address:',
|
93
|
+
'lang_input_search':'Search',
|
94
|
+
'address':{'value':"Beijing"}
|
95
|
+
},
|
96
|
+
'searchError':'Unable to locate the address!'
|
97
|
+
},
|
98
|
+
'link':{
|
99
|
+
'static':{
|
100
|
+
'lang_input_text':'Text:',
|
101
|
+
'lang_input_url':'URL:',
|
102
|
+
'lang_input_title':'Title:',
|
103
|
+
'lang_input_target':'open in new window:'
|
104
|
+
},
|
105
|
+
'validLink':'Supports only effective when a link is selected',
|
106
|
+
'httpPrompt':'The hyperlink you enter should start with "http|https|ftp://"!'
|
107
|
+
},
|
108
|
+
'map':{
|
109
|
+
'static':{
|
110
|
+
'lang_city':"City",
|
111
|
+
'lang_address':"Address",
|
112
|
+
'city':{'value':"Beijing"},
|
113
|
+
'lang_search':"Search",
|
114
|
+
'lang_dynamicmap':"Dynamic map"
|
115
|
+
},
|
116
|
+
'cityMsg':"Please enter the city name!",
|
117
|
+
'errorMsg':"Can't find the place!"
|
118
|
+
},
|
119
|
+
'video':{
|
120
|
+
'static':{
|
121
|
+
'lang_tab_insertV':"Video",
|
122
|
+
'lang_video_url':" URL ",
|
123
|
+
'lang_video_size':"Video Size",
|
124
|
+
'lang_videoW':"Width",
|
125
|
+
'lang_videoH':"Height",
|
126
|
+
'lang_alignment':"Alignment",
|
127
|
+
'videoSearchTxt':{'value':"Enter the search keyword!"},
|
128
|
+
'videoType':{'options':["All", "Hot", "Entertainment", "Funny", "Sports", "Science", "variety"]},
|
129
|
+
'videoSearchBtn':{'value':"Search in Baidu"},
|
130
|
+
'videoSearchReset':{'value':"Clear result"}
|
131
|
+
},
|
132
|
+
'numError':"Please enter the correct Num. e.g 123,400",
|
133
|
+
'floatLeft':"Float left",
|
134
|
+
'floatRight':"Float right",
|
135
|
+
'default':"Default",
|
136
|
+
'block':"Display in block",
|
137
|
+
'urlError':"The video url format may be wrong!",
|
138
|
+
'loading':" The video is loading, please wait…",
|
139
|
+
'clickToSelect':"Click to select",
|
140
|
+
'goToSource':'Visit source video ',
|
141
|
+
'noVideo':" Sorry,can't find the video,please try again!"
|
142
|
+
},
|
143
|
+
'formula':{
|
144
|
+
'static':{
|
145
|
+
'lang_tab_common':'Common',
|
146
|
+
'lang_tab_symbol':'Symbol',
|
147
|
+
'lang_tab_letter':'Letter'
|
148
|
+
}
|
149
|
+
}
|
150
|
+
};
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,150 @@
|
|
1
|
+
/**
|
2
|
+
* 中文语言包
|
3
|
+
*/
|
4
|
+
UM.I18N['zh-cn'] = {
|
5
|
+
'labelMap':{
|
6
|
+
'anchor':'锚点', 'undo':'撤销', 'redo':'重做', 'bold':'加粗', 'indent':'首行缩进', 'snapscreen':'截图',
|
7
|
+
'italic':'斜体', 'underline':'下划线', 'strikethrough':'删除线', 'subscript':'下标','fontborder':'字符边框',
|
8
|
+
'superscript':'上标', 'formatmatch':'格式刷', 'source':'源代码', 'blockquote':'引用',
|
9
|
+
'pasteplain':'纯文本粘贴模式', 'selectall':'全选', 'print':'打印', 'preview':'预览',
|
10
|
+
'horizontal':'分隔线', 'removeformat':'清除格式', 'time':'时间', 'date':'日期',
|
11
|
+
'unlink':'取消链接', 'insertrow':'前插入行', 'insertcol':'前插入列', 'mergeright':'右合并单元格', 'mergedown':'下合并单元格',
|
12
|
+
'deleterow':'删除行', 'deletecol':'删除列', 'splittorows':'拆分成行', 'splittocols':'拆分成列', 'splittocells':'完全拆分单元格',
|
13
|
+
'mergecells':'合并多个单元格', 'deletetable':'删除表格', 'cleardoc':'清空文档','insertparagraphbeforetable':"表格前插入行",'insertcode':'代码语言','fontfamily':'字体', 'fontsize':'字号', 'paragraph':'段落格式', 'image':'图片',
|
14
|
+
'edittable':'表格属性','edittd':'单元格属性', 'link':'超链接','emotion':'表情', 'spechars':'特殊字符', 'searchreplace':'查询替换', 'map':'百度地图', 'gmap':'Google地图',
|
15
|
+
'video':'视频', 'help':'帮助', 'justifyleft':'居左对齐', 'justifyright':'居右对齐', 'justifycenter':'居中对齐',
|
16
|
+
'justifyjustify':'两端对齐', 'forecolor':'字体颜色', 'backcolor':'背景色', 'insertorderedlist':'有序列表',
|
17
|
+
'insertunorderedlist':'无序列表', 'fullscreen':'全屏', 'directionalityltr':'从左向右输入', 'directionalityrtl':'从右向左输入',
|
18
|
+
'rowspacingtop':'段前距', 'rowspacingbottom':'段后距', 'highlightcode':'插入代码', 'pagebreak':'分页', 'insertframe':'插入Iframe', 'imagenone':'默认',
|
19
|
+
'imageleft':'左浮动', 'imageright':'右浮动', 'attachment':'附件', 'imagecenter':'居中', 'wordimage':'图片转存',
|
20
|
+
'lineheight':'行间距','edittip' :'编辑提示','customstyle':'自定义标题', 'autotypeset':'自动排版', 'webapp':'百度应用',
|
21
|
+
'touppercase':'字母大写', 'tolowercase':'字母小写','background':'背景','template':'模板','scrawl':'涂鸦','music':'音乐','inserttable':'插入表格',
|
22
|
+
'drafts': '草稿箱', 'formula':'数学公式'
|
23
|
+
|
24
|
+
|
25
|
+
},
|
26
|
+
'paragraph':{'p':'段落', 'h1':'标题 1', 'h2':'标题 2', 'h3':'标题 3', 'h4':'标题 4', 'h5':'标题 5', 'h6':'标题 6'},
|
27
|
+
'fontfamily':{
|
28
|
+
'songti':'宋体',
|
29
|
+
'kaiti':'楷体',
|
30
|
+
'heiti':'黑体',
|
31
|
+
'lishu':'隶书',
|
32
|
+
'yahei':'微软雅黑',
|
33
|
+
'andaleMono':'andale mono',
|
34
|
+
'arial': 'arial',
|
35
|
+
'arialBlack':'arial black',
|
36
|
+
'comicSansMs':'comic sans ms',
|
37
|
+
'impact':'impact',
|
38
|
+
'timesNewRoman':'times new roman'
|
39
|
+
},
|
40
|
+
'ok':"确认",
|
41
|
+
'cancel':"取消",
|
42
|
+
'closeDialog':"关闭对话框",
|
43
|
+
'tableDrag':"表格拖动必须引入uiUtils.js文件!",
|
44
|
+
'autofloatMsg':"工具栏浮动依赖编辑器UI,您首先需要引入UI文件!",
|
45
|
+
'anthorMsg':"链接",
|
46
|
+
'clearColor':'清空颜色',
|
47
|
+
'standardColor':'标准颜色',
|
48
|
+
'themeColor':'主题颜色',
|
49
|
+
'property':'属性',
|
50
|
+
'default':'默认',
|
51
|
+
'modify':'修改',
|
52
|
+
'justifyleft':'左对齐',
|
53
|
+
'justifyright':'右对齐',
|
54
|
+
'justifycenter':'居中',
|
55
|
+
'justify':'默认',
|
56
|
+
'clear':'清除',
|
57
|
+
'anchorMsg':'锚点',
|
58
|
+
'delete':'删除',
|
59
|
+
'clickToUpload':"点击上传",
|
60
|
+
'unset':'尚未设置语言文件',
|
61
|
+
't_row':'行',
|
62
|
+
't_col':'列',
|
63
|
+
'more':'更多',
|
64
|
+
'pasteOpt':'粘贴选项',
|
65
|
+
'pasteSourceFormat':"保留源格式",
|
66
|
+
'tagFormat':'只保留标签',
|
67
|
+
'pasteTextFormat':'只保留文本',
|
68
|
+
|
69
|
+
//===============dialog i18N=======================
|
70
|
+
'image':{
|
71
|
+
'static':{
|
72
|
+
'lang_tab_local':"本地上传",
|
73
|
+
'lang_tab_imgSearch':"网络图片",
|
74
|
+
'lang_input_dragTip':"支持图片拖拽上传",
|
75
|
+
'lang_btn_add':"添加"
|
76
|
+
},
|
77
|
+
'uploadError': '上传出错'
|
78
|
+
},
|
79
|
+
'emotion':{
|
80
|
+
'static':{
|
81
|
+
'lang_input_choice':'精选',
|
82
|
+
'lang_input_Tuzki':'兔斯基',
|
83
|
+
'lang_input_BOBO':'BOBO',
|
84
|
+
'lang_input_lvdouwa':'绿豆蛙',
|
85
|
+
'lang_input_babyCat':'baby猫',
|
86
|
+
'lang_input_bubble':'泡泡',
|
87
|
+
'lang_input_youa':'有啊'
|
88
|
+
}
|
89
|
+
},
|
90
|
+
'gmap':{
|
91
|
+
'static':{
|
92
|
+
'lang_input_address':'地址',
|
93
|
+
'lang_input_search':'搜索',
|
94
|
+
'address':{'value':"北京"}
|
95
|
+
},
|
96
|
+
'searchError':'无法定位到该地址!'
|
97
|
+
},
|
98
|
+
'link':{
|
99
|
+
'static':{
|
100
|
+
'lang_input_text':'文本内容:',
|
101
|
+
'lang_input_url':'链接地址:',
|
102
|
+
'lang_input_title':'标题:',
|
103
|
+
'lang_input_target':'是否在新窗口打开:'
|
104
|
+
},
|
105
|
+
'validLink':'只支持选中一个链接时生效',
|
106
|
+
'httpPrompt':'您输入的超链接中不包含http等协议名称,默认将为您添加http://前缀'
|
107
|
+
},
|
108
|
+
'map':{
|
109
|
+
'static':{
|
110
|
+
'lang_city':"城市",
|
111
|
+
'lang_address':"地址",
|
112
|
+
'city':{'value':"北京"},
|
113
|
+
'lang_search':"搜索",
|
114
|
+
'lang_dynamicmap':"插入动态地图"
|
115
|
+
},
|
116
|
+
'cityMsg':"请选择城市",
|
117
|
+
'errorMsg':"抱歉,找不到该位置!"
|
118
|
+
},
|
119
|
+
'video':{
|
120
|
+
'static':{
|
121
|
+
'lang_tab_insertV':"插入视频",
|
122
|
+
'lang_video_url':"视频网址",
|
123
|
+
'lang_video_size':"视频尺寸",
|
124
|
+
'lang_videoW':"宽度",
|
125
|
+
'lang_videoH':"高度",
|
126
|
+
'lang_alignment':"对齐方式",
|
127
|
+
'videoSearchTxt':{'value':"请输入搜索关键字!"},
|
128
|
+
'videoType':{'options':["全部", "热门", "娱乐", "搞笑", "体育", "科技", "综艺"]},
|
129
|
+
'videoSearchBtn':{'value':"百度一下"},
|
130
|
+
'videoSearchReset':{'value':"清空结果"}
|
131
|
+
},
|
132
|
+
'numError':"请输入正确的数值,如123,400",
|
133
|
+
'floatLeft':"左浮动",
|
134
|
+
'floatRight':"右浮动",
|
135
|
+
'default':"默认",
|
136
|
+
'block':"独占一行",
|
137
|
+
'urlError':"输入的视频地址有误,请检查后再试!",
|
138
|
+
'loading':" 视频加载中,请等待……",
|
139
|
+
'clickToSelect':"点击选中",
|
140
|
+
'goToSource':'访问源视频',
|
141
|
+
'noVideo':" 抱歉,找不到对应的视频,请重试!"
|
142
|
+
},
|
143
|
+
'formula':{
|
144
|
+
'static':{
|
145
|
+
'lang_tab_common':'常用公式',
|
146
|
+
'lang_tab_symbol':'符号',
|
147
|
+
'lang_tab_letter':'字母'
|
148
|
+
}
|
149
|
+
}
|
150
|
+
};
|