Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
璃白.
markdown-editor
提交
34665141
M
markdown-editor
项目概览
璃白.
/
markdown-editor
上一次同步 接近 2 年
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
markdown-editor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
34665141
编写于
12月 14, 2021
作者:
郭
郭维嘉
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:优化链接渲染规则&过滤行内style
上级
d3636759
变更
9
展开全部
显示空白变更内容
内联
并排
Showing
9 changed file
with
31 addition
and
32 deletion
+31
-32
.DS_Store
.DS_Store
+0
-0
dist/.DS_Store
dist/.DS_Store
+0
-0
dist/index.html
dist/index.html
+18
-24
dist/markdown-editor.js
dist/markdown-editor.js
+1
-1
package.json
package.json
+1
-1
src/assets/js/utils.js
src/assets/js/utils.js
+2
-1
src/assets/style/global.less
src/assets/style/global.less
+3
-0
src/components/content/mixins/render-mixins.js
src/components/content/mixins/render-mixins.js
+5
-4
src/components/content/mixins/select-link-type-mixins.js
src/components/content/mixins/select-link-type-mixins.js
+1
-1
未找到文件。
.DS_Store
浏览文件 @
34665141
无法预览此类型文件
dist/.DS_Store
浏览文件 @
34665141
无法预览此类型文件
dist/index.html
浏览文件 @
34665141
...
...
@@ -31,12 +31,6 @@
<button
id=
"a"
>
111111
</button>
<button
id=
"b"
>
2222222
</button>
<script
src=
"./markdown-editor.js"
></script>
<script>
console
.
log
(
"
send
"
);
ipcRenderer
.
send
(
"
token
"
,
1
);
</script>
<script>
// setTimeout(() => {
try
{
...
...
@@ -108,24 +102,24 @@
height
:
400
,
// rows: 'auto',
// height: 40,
//
toolsOptions: {
//
// call: true,
//
format: true,
//
bold: true,
//
italic: true,
//
quote: true,
//
code: true,
//
link: true,
//
ul: true,
//
ol: true,
//
task: true,
//
table: true,
// img: tru
e,
// file: tru
e,
//
test1: true,
//
// help: false,
//
fullScreen: true
//
},
toolsOptions
:
{
// call: true,
format
:
true
,
bold
:
true
,
italic
:
true
,
quote
:
true
,
code
:
true
,
link
:
true
,
ul
:
true
,
ol
:
true
,
task
:
true
,
table
:
true
,
img
:
fals
e
,
file
:
fals
e
,
test1
:
true
,
// help: false,
fullScreen
:
true
},
zIndex
:
7000
,
// maxLength: 20000,
showWordLimit
:
true
,
...
...
dist/markdown-editor.js
浏览文件 @
34665141
此差异已折叠。
点击以展开。
package.json
浏览文件 @
34665141
{
"name"
:
"awesome-markdown-editor"
,
"description"
:
" A open source markdown editor of csdn codechina team contributed"
,
"version"
:
"0.9.
2
"
,
"version"
:
"0.9.
3
"
,
"publisher"
:
"guoweijia"
,
"scripts"
:
{
"start"
:
"webpack serve --mode=development"
,
...
...
src/assets/js/utils.js
浏览文件 @
34665141
...
...
@@ -419,7 +419,6 @@ export function renderLinkCard(title, item) {
case
"
title
"
:
content
=
`<span class="md_link_url">
${
title
||
item
.
title
||
""
}
</span>`
;
break
;
default
:
case
"
link
"
:
content
=
`<span class="md_link_url">
${
item
.
url
}
</span>`
;
break
;
...
...
@@ -449,6 +448,8 @@ export function renderLinkCard(title, item) {
</span>
</span></div>`
;
break
;
default
:
content
=
`<span class="md_link_url">
${
title
||
item
.
url
}
</span>`
;
}
return
content
;
}
...
...
src/assets/style/global.less
浏览文件 @
34665141
...
...
@@ -75,6 +75,9 @@ textarea {
.md_img_container {
text-align: center;
img[align="center"] {
display: inline-block;
}
}
.md_flex_card {
...
...
src/components/content/mixins/render-mixins.js
浏览文件 @
34665141
...
...
@@ -33,7 +33,8 @@ export default {
"
textarea
"
,
"
form
"
,
"
button
"
]
],
FORBID_ATTR
:
[
"
style
"
]
});
// 去除标签
const
filteredTags
=
getFilteredTags
(
html
,
cleanHtml
);
// 计算是否有标签被过滤
// 链接转换为卡片
...
...
@@ -101,9 +102,9 @@ export default {
if
(
reg_align
.
exec
(
title
))
{
var
a
=
reg_align
.
exec
(
title
)[
2
];
if
(
a
===
"
center
"
)
{
out
+=
'
style="display:inline-block;"
'
;
}
//
if (a === "center") {
//
out += 'style="display:inline-block;"';
//
}
out
+=
'
align="
'
+
a
+
'
"
'
;
}
if
(
reg_width
.
exec
(
title
))
{
...
...
src/components/content/mixins/select-link-type-mixins.js
浏览文件 @
34665141
...
...
@@ -14,7 +14,7 @@ export default {
typeStr
=
linkTypeSpiltStr
+
"
title
"
;
break
;
case
2
:
typeStr
=
linkTypeSpiltStr
+
"
link
"
;
//
typeStr = linkTypeSpiltStr + "link";
break
;
case
3
:
typeStr
=
linkTypeSpiltStr
+
"
3
"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录