GitHub - 2005ccy/imageParser: A javascript class used for drag&drop or paste images on the contenteditable element.

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Folders and files

NameName

Last commit message

Last commit date

Latest commit

History

4 Commits

Repository files navigation

imageParser

本项目是一个javascript类,用于在富文本编辑框上绑定拖拽和粘贴图片事件,然后解析显示出来。基于drag&drop、fileReader、onpaste、getAsFile等技术,目前仅支持Chrome和Firefox浏览器。

如何使用

  • 在你的页面中引入imageParser.js

  • 调用imageParser.init(editorId,imgListId)方法,该方法接受两个参数:editorId是编辑框的id,imgListId是用于显示图片列表的容器id,通常是一个ul标签。

  • 修改类里面的appendThumbImg方法,可以自定义显示图片的方式

    just try it!

查看demo

Licence

  • 版权所有 @tysonpan

About

A javascript class used for drag&drop or paste images on the contenteditable element.

Resources

Readme

Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks

Releases

No releases published

Languages

  • JavaScript 60.3%
  • CSS 28.0%
  • HTML 11.7%