Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Zebra-h
Awesome-Markdown-Editor
提交
9488cd48
Awesome-Markdown-Editor
项目概览
Zebra-h
/
Awesome-Markdown-Editor
与 Fork 源项目一致
Fork自
gitcode_dev / Awesome-Markdown-Editor
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Awesome-Markdown-Editor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
9488cd48
编写于
9月 03, 2021
作者:
璃白.
🌻
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://codechina.csdn.net/codechina_dev/markdown-editor
上级
f03e7082
80ebb983
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
2 deletion
+18
-2
README.md
README.md
+18
-2
未找到文件。
README.md
浏览文件 @
9488cd48
...
...
@@ -5,6 +5,20 @@
## 更新记录
### v0.8
2021-09-03 v0.8更新,添加功能:
-
支持注册自定义工具栏按钮
[
registerTools
](
#registertools
)
-
支持用户选择链接展示形式(默认卡片)
-
添加标题快捷工具
-
支持上传附件
-
支持上传/插入视频
-
上传图片支持设定尺寸/对齐
-
优化首行缩进规则
-
**修改onUpload方法**
[
onUpload
](
#onupload
)
### v0.7
2021-08-05 v0.7更新,添加功能:
...
...
@@ -121,7 +135,7 @@ new MdEditor({
| onFocus | 获取焦点事件 | Function | function(res) {}
[
示例
](
#onfocus
)
| onBlur | 失去焦点事件 | Function | function(res) {}
[
示例
](
#onblur
)
| onChange | 获取编辑器markdown及html内容 | Function | function(res) {}
[
示例
](
#onchange
)
| onUpload | 上传文件钩子函数 | Function | function(file, callback) {}
[
示例
](
#onupload
)
| onUpload | 上传文件钩子函数 | Function | function(file,
type,
callback) {}
[
示例
](
#onupload
)
| onsubmit | 快捷键函数 | Function | function(file, callback) {}
[
示例
](
#onsubmit
)
| queryUserList | @用户列表查询函数 | Function | function(keyword), callback) {}
[
示例
](
#queryuserlist
)
| renderLinks | 把链接渲染成卡片样式 | Function | function(list)), callback) {}
[
示例
](
#renderlinks
)
...
...
@@ -267,7 +281,8 @@ new MdEditor({
```
js
new
MdEditor
({
...,
onUpload
:
function
(
file
,
callback
)
{
onUpload
:
function
(
file
,
type
,
callback
)
{
// type 返回 img/file/video
// do something with file
// ajax
// ...
...
...
@@ -329,6 +344,7 @@ new MdEditor({
```
js
renderLinks
:
function
(
val
,
callback
)
{
const
newLinks
=
val
.
map
(
item
=>
{
// 调用接口获取链接的信息
item
.
title
=
"
指定的可执行文件cmd.exe未能运行,某某函数不正确-后端-CSDN问答
"
;
item
.
icon
=
"
https://g.csdnimg.cn/static/logo/favicon32.ico
"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录