diff --git a/_src/adapter/imagescale.js b/_src/adapter/imagescale.js
index 5cd006cd..f9fe1d80 100644
--- a/_src/adapter/imagescale.js
+++ b/_src/adapter/imagescale.js
@@ -64,11 +64,12 @@ UM.registerUI('imagescale',function () {
});
me.addListener('click', function (type, e) {
- if (e.target.tagName == 'IMG' && me.body.contentEditable!="false") {
+ // 使用unselectable属性(IE私有)标识是否可选
+ if (e.target.tagName == 'IMG' && me.body.contentEditable!="false" && e.target.getAttribute('unselectable') !== 'on') {
var range = new dom.Range(me.document, me.body);
range.selectNode(e.target).select();
}
});
}
-});
\ No newline at end of file
+});
diff --git a/_src/plugins/image.js b/_src/plugins/image.js
index 5b53ca0b..a7641d39 100755
--- a/_src/plugins/image.js
+++ b/_src/plugins/image.js
@@ -11,6 +11,21 @@
*/
UM.commands['insertimage'] = {
execCommand:function (cmd, opt) {
+ function image(ci) {
+ var style = ci['floatStyle'] == 'left' || ci['floatStyle'] == 'right' ? 'float:' + ci['floatStyle'] + ';' : '';
+
+ return '';
+ }
+
opt = utils.isArray(opt) ? opt : [opt];
if (!opt.length) {
return;
@@ -19,15 +34,7 @@ UM.commands['insertimage'] = {
var html = [], str = '', ci;
ci = opt[0];
if (opt.length == 1) {
- str = '
';
+ str = image(ci);
if (ci['floatStyle'] == 'center') {
str = '
' + str + '
'; } @@ -35,16 +42,11 @@ UM.commands['insertimage'] = { } else { for (var i = 0; ci = opt[i++];) { - str = '' + image(ci) + '
'; html.push(str); } } me.execCommand('insertHtml', html.join(''), true); } -}; \ No newline at end of file +}; diff --git a/themes/default/_css/editor.css b/themes/default/_css/editor.css index aac7c387..febacda5 100755 --- a/themes/default/_css/editor.css +++ b/themes/default/_css/editor.css @@ -36,4 +36,11 @@ } .edui-editor-body.focus{border:1px solid #5c9dff} .edui-editor-body table{margin:10px 0 10px;border-collapse:collapse;display:table;} -.edui-editor-body td{padding: 5px 10px;border: 1px solid #DDD;} \ No newline at end of file +.edui-editor-body td{padding: 5px 10px;border: 1px solid #DDD;} +.edui-unselectable{ + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + -khtml-user-select: none; + user-select: none; +}