Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: update renderer #346

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,14 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta
name="keywords"
content="md,markdown,markdown-editor,wechat,official-account,yanglbme,doocs"
/>
<meta
name="description"
content="Wechat Markdown Editor | 一款高度简洁的微信 Markdown 编辑器"
/>
<meta name="keywords" content="md,markdown,markdown-editor,wechat,official-account,yanglbme,doocs" />
<meta name="description" content="Wechat Markdown Editor | 一款高度简洁的微信 Markdown 编辑器" />
<meta
name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
/>
<title>微信 Markdown 编辑器 | Doocs 开源社区</title>
<link
rel="shortcut icon"
href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/favicon.png"
/>
<link rel="shortcut icon" href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/favicon.png" />
<link
rel="apple-touch-icon-precomposed"
href="https://cdn-doocs.oss-cn-shenzhen.aliyuncs.com/gh/doocs/md/images/1648303220922-7e14aefa-816e-44c1-8604-ade709ca1c69.png"
Expand Down
4 changes: 2 additions & 2 deletions src/components/CodemirrorEditor/UploadImgDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -574,8 +574,8 @@ function uploadImage(params) {
:deep(.CodeMirror) {
border: 1px solid #eee;
height: 300px !important;
font-family: 'Fira Mono', 'DejaVu Sans Mono', Menlo, Consolas,
'Liberation Mono', Monaco, 'Lucida Console', monospace !important;
font-family: 'Fira Mono', 'DejaVu Sans Mono', Menlo, Consolas, 'Liberation Mono', Monaco, 'Lucida Console',
monospace !important;
line-height: 20px;
.CodeMirror-scroll {
Expand Down
5 changes: 3 additions & 2 deletions src/stores/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,9 @@ export const useStore = defineStore(`store`, () => {
// 更新编辑器
const editorRefresh = () => {
codeThemeChange()

const renderer = wxRenderer.getRenderer(isCiteStatus.value)
const renderer = wxRenderer
renderer.reset()
renderer.setOptions({ status: isCiteStatus.value, legend: legend.value })
marked.setOptions({ renderer })
let outputTemp = marked.parse(editor.value.getValue(0))

Expand Down
Loading
Loading