Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
月谷丶
Awesome-Markdown-Editor
提交
a108af2e
Awesome-Markdown-Editor
项目概览
月谷丶
/
Awesome-Markdown-Editor
与 Fork 源项目一致
Fork自
gitcode_dev / Awesome-Markdown-Editor
通知
1
Star
0
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,体验更适合开发者的 AI 搜索 >>
提交
a108af2e
编写于
7月 19, 2021
作者:
璃白.
🌻
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat
上级
116ee0ba
变更
8
显示空白变更内容
内联
并排
Showing
8 changed file
with
82 addition
and
29 deletion
+82
-29
package.json
package.json
+1
-1
src/App.vue
src/App.vue
+1
-1
src/assets/js/utils.js
src/assets/js/utils.js
+9
-1
src/assets/style/variable.less
src/assets/style/variable.less
+2
-1
src/components/content/help-doc.vue
src/components/content/help-doc.vue
+35
-7
src/components/header/components/code-select.vue
src/components/header/components/code-select.vue
+25
-9
src/components/header/components/markdown-doc.vue
src/components/header/components/markdown-doc.vue
+1
-1
src/components/header/md-header.vue
src/components/header/md-header.vue
+8
-8
未找到文件。
package.json
浏览文件 @
a108af2e
{
"name"
:
"markdown-editor"
,
"description"
:
" A open source markdown editor of csdn codechina team contributed"
,
"version"
:
"0.6.
1
"
,
"version"
:
"0.6.
2
"
,
"publisher"
:
"guoweijia"
,
"scripts"
:
{
"start"
:
"webpack serve --mode=development"
,
...
...
src/App.vue
浏览文件 @
a108af2e
...
...
@@ -315,7 +315,7 @@ export default {
const
newText
=
formatText
(
originalText
,
selectionInfo
,
"
\n
\n
![img](
"
,
"
\n
![img](
"
,
`
${
url
}
)\n`
);
_this
.
text
=
newText
;
...
...
src/assets/js/utils.js
浏览文件 @
a108af2e
...
...
@@ -74,7 +74,8 @@ export function initStyle({
frameBgColor
,
contentBgColor
,
codeBgColor
,
codeTheme
codeTheme
,
helpdocColor
})
{
// 夜晚模式
if
(
dark
)
{
...
...
@@ -86,6 +87,7 @@ export function initStyle({
frameBgColor
=
"
#222226
"
;
codeBgColor
=
"
#777888
"
;
contentBgColor
=
"
#222226
"
;
helpdocColor
=
"
#CCCCD8
"
;
}
if
(
frameBgColor
)
{
document
.
documentElement
.
style
.
setProperty
(
...
...
@@ -125,6 +127,12 @@ export function initStyle({
textColor
);
}
if
(
helpdocColor
)
{
document
.
documentElement
.
style
.
setProperty
(
"
--md-editor-helpdoc-color
"
,
helpdocColor
);
}
if
(
textColorActive
)
{
document
.
documentElement
.
style
.
setProperty
(
"
--md-editor-text-color-active
"
,
...
...
src/assets/style/variable.less
浏览文件 @
a108af2e
...
...
@@ -2,9 +2,10 @@
--md-editor-border-color: #dbdbdb;
--md-editor-border-color-active: #409eff;
--md-editor-text-color: #303030;
--md-editor-text-color-active: #
000
;
--md-editor-text-color-active: #
333
;
--md-editor-frame-bg-color: #fff;
--md-editor-content-bg-color: #fff;
--md-editor-helpdoc-color: #666666;
--md-editor-code-bg-color: #f3f4f5;
--md-editor-fullScrren-zIndex: 2000;
}
src/components/content/help-doc.vue
浏览文件 @
a108af2e
<
template
>
<div
class=
"help_doc"
>
<div
class=
"container"
>
<div
class=
"
doc_
container"
>
<h2>
Markdown 语法
<span
...
...
@@ -124,7 +124,35 @@ export default {
padding-right: 0;
// border-radius: 4px;
z-index: 9;
.container {
&::before {
content: "";
position: absolute;
top: 4px;
left: 0;
width: 100%;
height: 24px;
pointer-events: none;
background: linear-gradient(
to bottom,
var(--md-editor-content-bg-color),
transparent
);
}
&::after {
content: "";
pointer-events: none;
position: absolute;
bottom: 12px;
left: 0;
width: 100%;
height: 24px;
background: linear-gradient(
to top,
var(--md-editor-content-bg-color),
transparent
);
}
.doc_container {
overflow-y: auto;
padding-right: 14px;
height: 100%;
...
...
@@ -133,20 +161,20 @@ export default {
display: none;
}
h2 {
font-size: 1
8
px;
color: #333
;
font-size: 1
6
px;
color: var(--md-editor-text-color-active)
;
.icon {
float: right;
margin-top:
4
px;
margin-top:
3
px;
cursor: pointer;
font-weight: 400;
}
}
ul.list {
margin-top: 1
0
px;
margin-top: 1
4
px;
li {
font-size: 14px;
color:
#666
;
color:
var(--md-editor-helpdoc-color)
;
margin-bottom: 10px;
.icon {
display: inline-block;
...
...
src/components/header/components/code-select.vue
浏览文件 @
a108af2e
<
template
>
<div
class=
"code_select_container"
>
<ul>
<li
@
click=
"$emit('select', item)"
...
...
@@ -8,6 +9,7 @@
{{
item
}}
</li>
</ul>
</div>
</
template
>
<
script
>
export
default
{
...
...
@@ -51,6 +53,19 @@ export default {
};
</
script
>
<
style
lang=
"less"
scoped
>
.code_select_container {
position: relative;
&::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 18px;
pointer-events: none;
background: linear-gradient(to top, #fff, transparent);
}
}
ul {
max-height: 142px;
overflow-y: auto;
...
...
@@ -62,6 +77,7 @@ ul {
scrollbar-color: transparent transparent;
// scrollbar-track-color: transparent;
// -ms-scrollbar-track-color: transparent;
&::-webkit-scrollbar {
display: none;
width: 2px;
...
...
src/components/header/components/markdown-doc.vue
浏览文件 @
a108af2e
...
...
@@ -25,7 +25,7 @@ export default {
.tips {
text-align: center;
.doc {
color:
#666
;
color:
var(--md-editor-text-color-active)
;
}
}
</
style
>
src/components/header/md-header.vue
浏览文件 @
a108af2e
...
...
@@ -5,16 +5,16 @@
:class=
"['tab_item',
{ active: canPreview
&&
!showPreview }]"
@click="setShowPreview(false)"
>
<
span
:class=
"['icon iconfont', `icon-bianji`]"
></span
>
<span
v-if=
"!isMobile"
>
编辑
</span>
<
!--
<span
:class=
"['icon iconfont', `icon-bianji`]"
></span>
--
>
<span>
编辑
</span>
</div>
<div
v-if=
"canPreview"
:class=
"['tab_item',
{ active: showPreview }]"
@click="setShowPreview(true)"
>
<
span
:class=
"['icon iconfont', `icon-yulan`]"
></span
>
<span
v-if=
"!isMobile"
>
预览
</span>
<
!--
<span
:class=
"['icon iconfont', `icon-yulan`]"
></span>
--
>
<span>
预览
</span>
</div>
</div>
<div
class=
"header_tools"
v-if=
"!showPreview"
>
...
...
@@ -178,7 +178,7 @@ export default {
name
:
"
quote
"
,
icon
:
"
yinyong
"
,
tip
:
"
插入引用
"
,
doc
:
"
>
空格
"
,
doc
:
"
>
内容
"
,
startStr
:
"
\n
>
"
,
endStr
:
""
},
...
...
@@ -214,7 +214,7 @@ export default {
name
:
"
ol
"
,
icon
:
"
youxuliebiao
"
,
tip
:
"
添加有序列表
"
,
doc
:
"
1.
空格
"
,
doc
:
"
1.
内容
"
,
startStr
:
""
,
endStr
:
""
},
...
...
@@ -229,7 +229,7 @@ export default {
name
:
"
task
"
,
icon
:
"
renwu
"
,
tip
:
"
添加任务列表
"
,
doc
:
"
- [空格]
"
,
doc
:
"
- [空格]
内容
"
,
startStr
:
"
\n
- [ ]
"
,
endStr
:
""
},
...
...
@@ -244,7 +244,7 @@ export default {
{
name
:
"
help
"
,
icon
:
"
help
"
,
tip
:
"
帮助
"
tip
:
"
Markdown语法
"
},
{
name
:
"
fullScreen
"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录