Commit 54496e83 authored by chenqikuai's avatar chenqikuai

fix: 富文本样式修改

parent 2ae28a1d
...@@ -54,3 +54,26 @@ export default Vue.extend({ ...@@ -54,3 +54,26 @@ export default Vue.extend({
}, },
}) })
</script> </script>
<style lang="less">
.vhtml{
h1 {
font-size: 1.4rem !important;
font-weight: 300 !important;
line-height: 1.5rem !important;
letter-spacing: -0.01562em !important;
}
h2 {
font-size: 1.2rem !important;
font-weight: 300 !important;
line-height: 1.5rem !important;
letter-spacing: -0.01562em !important;
}
h3 {
font-size: 1rem !important;
font-weight: 300 !important;
line-height: 1.5rem !important;
letter-spacing: -0.01562em !important;
}
}
</style>
\ No newline at end of file
.editor { .editor {
.ProseMirror{ .ProseMirror{
min-height: 400px; min-height: 400px;
...@@ -6,8 +8,6 @@ ...@@ -6,8 +8,6 @@
outline: 3px solid #68cef8; outline: 3px solid #68cef8;
} }
position: relative; position: relative;
max-width: 70%;
margin: 0 auto 5rem auto;
&__content { &__content {
overflow-wrap: break-word; overflow-wrap: break-word;
......
<template> <template>
<div class="border border-gray-300 p-3 rounded" > <div class="border border-gray-300 p-3 rounded" >
<EditorMenuBar :editor="editor" /> <EditorMenuBar :editor="editor" />
<editor-content :editor="editor" class="editor__content" /> <editor-content :editor="editor" class="editor__content vhtml" />
</div> </div>
</template> </template>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
{{ $route.query.id }} {{ $route.query.id }}
<p class="text-gray-400">新增时间:{{ time | formatDate }}</p> <p class="text-gray-400">新增时间:{{ time | formatDate }}</p>
<img v-if="imageUrl" :src="imageUrl" class="mx-auto my-5" /> <img v-if="imageUrl" :src="imageUrl" class="mx-auto my-5" />
<p class="text-left p-5" v-html="content">{{ content }}</p> <div class="text-left p-5 vhtml" v-html="content">{{ content }}</div>
</div> </div>
</template> </template>
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
<div> <div>
<p class=" text-2xl font-bold mb-5 ">{{ title }}</p> <p class=" text-2xl font-bold mb-5 ">{{ title }}</p>
<p class=" text-gray-400">新增时间:{{ time | format }} <span class=" ml-2">作者:{{ name }}</span></p> <p class=" text-gray-400">新增时间:{{ time | format }} <span class=" ml-2">作者:{{ name }}</span></p>
<div class="text-left p-5" v-html="content"></div> <div class="text-left p-5 vhtml" v-html="content"></div>
<!-- <p class="text-left p-5">{{content}}</p> -->
</div> </div>
</template> </template>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment