Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

优化上传图片 #570

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _src/adapter/fullscreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
var holder = this.getEditorHolder(),
state = this.getContentAreaStatus();

if ( this.supportMin() ) {
if ( this.supportMin() && !this.editor.options.frameFixSize) { // 编辑区域固定尺寸,从全屏回到正常尺寸在supportMin的浏览器中不要强制删除height属性
delete state.height;
holder.style.height = null;
}
Expand Down Expand Up @@ -429,4 +429,4 @@
//开始监听
Fullscreen.listen();

})();
})();
6 changes: 3 additions & 3 deletions dialogs/image/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,11 @@

return me;
},
uploadComplete: function(r){
uploadComplete: function(r){ // r contains Dom elements, e.g.:<div> <p>{url: "xxxx", state: 'SUCCESS'}</p> </div>
var me = this;
try{
var json = eval('('+r+')');
var _r = r.match(/({.?url.?:.*?})/)[1] || '';
var json = eval('('+_r+')');
Base.callback(me.editor, me.dialog, json.url, json.state);
}catch (e){
var lang = me.editor.getLang('image');
Expand Down Expand Up @@ -442,4 +443,3 @@
Base.callback(editor, $w, url, state)
})
})();