braft-editor
Advanced tools
Comparing version 1.6.2 to 1.7.0
## 更新记录 | ||
- 2018-03-13 v1.7.0 | ||
- 新增插入水平线功能 | ||
- 支持设置文字间距与段落的两端缩进,此功能由[@joacy](https://github.com/joacycode)贡献,非常感谢 | ||
- 新增textAlignOptions属性,用于设置文本对齐选项,此功能由[@joacy](https://github.com/joacycode)贡献,非常感谢 | ||
- 新增allowSetTextBackgroundColor属性,用于开启/关闭文字背景色设置功能,此功能由[@joacy](https://github.com/joacycode)贡献,非常感谢 | ||
- 新增media.onRemove和media.onChange子属性,用于增强媒体库的扩展性 | ||
- 其他优化 | ||
- 2018-03-09 v1.6.2 | ||
@@ -3,0 +10,0 @@ - 增加与Ant.Design的兼容性 |
{ | ||
"name": "braft-editor", | ||
"version": "1.6.2", | ||
"version": "1.7.0", | ||
"description": "Rich Text Editor Based On Draft.js", | ||
@@ -5,0 +5,0 @@ "main": "dist/braft.js", |
@@ -12,2 +12,9 @@ # Braft Editor | ||
## 最近更新 | ||
- 2018-03-13 v1.7.0 | ||
- 新增插入水平线功能 | ||
- 支持设置文字间距与段落的两端缩进,此功能由[@joacy](https://github.com/joacycode)贡献,非常感谢 | ||
- 新增textAlignOptions属性,用于设置文本对齐选项,此功能由[@joacy](https://github.com/joacycode)贡献,非常感谢 | ||
- 新增allowSetTextBackgroundColor属性,用于开启/关闭文字背景色设置功能,此功能由[@joacy](https://github.com/joacycode)贡献,非常感谢 | ||
- 新增media.onRemove和media.onChange子属性,用于增强媒体库的扩展性 | ||
- 其他优化 | ||
- 2018-03-09 v1.6.2 | ||
@@ -149,3 +156,6 @@ - 增加与Ant.Design的兼容性 | ||
### onSave [function] | ||
指定一个函数,通常用于保存操作,在编辑器处于焦点时按下command/ctrl + s会执行此函数 | ||
### controls [array:[string]] | ||
@@ -156,6 +166,6 @@ | ||
[ | ||
'undo', 'redo', 'split', 'font-size', 'font-family', 'line-height', 'text-color', | ||
'bold', 'italic', 'underline', 'strike-through', 'superscript', | ||
'subscript', 'text-align', 'split', 'headings', 'list_ul', 'list_ol', | ||
'blockquote', 'code', 'split', 'link', 'split', 'media' | ||
'undo', 'redo', 'split', 'font-size', 'font-family', 'line-height', 'letter-spacing', | ||
'indent','text-color', 'bold', 'italic', 'underline', 'strike-through', | ||
'superscript', 'subscript', 'emoji', 'text-align', 'split', 'headings', 'list_ul', | ||
'list_ol', 'blockquote', 'code', 'split', 'link', 'split', 'hr', 'split', 'media' | ||
] | ||
@@ -246,7 +256,9 @@ ``` | ||
### onSave [function] | ||
### textAlignOptions [array] | ||
指定一个函数,通常用于保存操作,在编辑器处于焦点时按下command/ctrl + s会执行此函数 | ||
指定可使用的文字对齐方式,默认值如下: | ||
```javascript | ||
['left', 'center', 'right', 'justify'] | ||
``` | ||
### colors [array:[string]] | ||
@@ -263,3 +275,6 @@ | ||
### allowSetTextBackgroundColor [boolean] | ||
是否允许设置文本的背景颜色,默认是true | ||
### fontSizes [array:[number]] | ||
@@ -286,2 +301,16 @@ | ||
### letterSpacings [array:[number]] | ||
指定编辑器可用的字符间隔列表,用于设定文本的字符间隔,默认可用间隔值: | ||
```javascript | ||
[0, 2, 4, 6] | ||
``` | ||
### indents [array:[number]] | ||
指定编辑器可用的两端缩进列表,用于设定文本段落的两端缩进,默认可用缩进值: | ||
```javascript | ||
[0, 14, 21, 28] | ||
``` | ||
### fontFamilies [array:[object]] | ||
@@ -349,3 +378,5 @@ | ||
validateFn: null, // 指定本地校验函数,说明见下文 | ||
uploadFn: null // 指定上传函数,说明见下文 | ||
uploadFn: null, // 指定上传函数,说明见下文 | ||
onRemove: null, // 指定媒体库文件被删除时的回调,参数为媒体文件的id | ||
onChange: null, // 指定媒体库文件列表发生变化时的回调,参数为媒体库文件列表 | ||
} | ||
@@ -352,0 +383,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
499671
267
701