fe-drone-ci/src/views/components-demo/tinymce.vue

47 lines
1.8 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="components-container">
<aside>
Rich text is a core feature of the management backend, but at the same time it is a place with lots of pits. In the process of selecting rich texts, I also took a lot of detours. The common rich texts on the market have been basically used, and I finally chose Tinymce. See the more detailed rich text comparison and introduction.
<a
target="_blank"
class="link-type"
href="https://panjiachen.github.io/vue-element-admin-site/component/rich-editor.html"
>Documentation</a>
</aside>
<div>
<tinymce
v-model="content"
:height="300"
/>
</div>
</div>
</template>
<script>
import Tinymce from '@/components/Tinymce/example'
export default {
name: 'TinymceDemo',
components: { Tinymce },
data() {
return {
content: `<h1 style="text-align: center;">测试demo!</h1>
<p></p>
<img class="img" src="https://ali-image-test.dabanjia.com/image/20200508/1588911589606_5140%24ban.jpg" width="200"/>
<p>枕着幸福在梦中微笑清零生活的压力烦恼阳光透过窗与你拥抱伸伸懒腰迎接周末来到问候源于无法按捺的心跳愿你周末乐逍遥生活更美妙
周末来到让烦恼跑光让忧愁找不到跟寂寞说再见跟压力说拜拜跟快乐说你好牵着幸福的手携上平安开开心心的过周末
每个人都有一个世界每首歌都有一个故事每一周都有一个周末每个人都要一个愿望我的愿望很现实周末清晨搅黄你的美梦周末快乐
</p>
`
}
}
}
</script>
<style scoped>
.editor-content {
margin-top: 20px;
}
</style>