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

复制粘贴方式上传图片,插入位置不正确 #36

Open
lianguan opened this issue Jun 17, 2016 · 1 comment
Open

复制粘贴方式上传图片,插入位置不正确 #36

lianguan opened this issue Jun 17, 2016 · 1 comment
Milestone

Comments

@lianguan
Copy link
Contributor

lianguan commented Jun 17, 2016

操作过程:
通过 复制、粘贴上传图片,意图使图片插入下图指示的光标处。
image

目前,会追加到编辑框尾部
image

@lianguan lianguan changed the title drag and drop方式上传图片,插入位置不正确 复制粘贴方式上传图片,插入位置不正确 Jun 17, 2016
@lianguan lianguan added this to the V1.0.0 milestone Jun 21, 2016
@abbychau
Copy link
Contributor

no solution yet.
but here are some information.

Firstly, on calling
$("#body_field").inlineattach({ uploadUrl: Hifone.Config.uploader_url, extraParams: { _token: Hifone.Config.token }, onReceivedFile: function(file) {console.log($("#body_field").caret())}, onUploadedFile: function(e) {} })
for debugging:

$("#body_field").caret() is already pulling to the end on or before the callback onReceivedFile

Secondly,
by putting files outside the default list
["image/jpeg", "image/png", "image/jpg", "image/gif"]

the file is blocked successfully but the caret keeps in the original position.

This could deduce there are some conflicts from jquery-inlineattachment and the existing bindings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants