1.0.6 • Published 6 years ago

@bview/mini-editor v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

mini-editor

开发:

cd mini-editor

执行:yarn link

执行:yarn build,会自动监听并转译src目录中的es6文件


其他项目中(example demo)使用mini-editor

  • cd demo

  • yarn link mini-editor

  • 项目源文件引入mini-editorimport MiniEditor from 'mini-editor'

一个例子🌰:

import MiniEditor from 'mini-editor'
let me = new MiniEditor( document.querySelector('#richEle') , {
        placeholder: '请输入姓名' ,
    } )
// 监听输入事件
me.on( 'input' , this.changeValue )
// 设置富文本的值
me.content( value )
// 只读模式
me.disable( true )

placeholder样式设置,参考Placeholder support for contentEditable elements, without JavaScript。第三点,chrome的br问题,插件已经支持自动检测清理br

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

0.0.0

7 years ago