tinymce.vue 1.1 KB
Newer Older
P
init  
Pan 已提交
1 2
<template>
  <div class="components-container">
花裤衩 已提交
3 4 5
    <code>
      {{$t('components.tinymceTips')}}
      <a target="_blank" class="link-type" href="https://panjiachen.github.io/vue-element-admin-site/#/rich-editor"> {{$t('components.documentation')}}</a>
P
Pan 已提交
6
    </code>
P
Pan 已提交
7
    <div>
花裤衩 已提交
8
      <tinymce :height="300" v-model="content"></tinymce>
P
init  
Pan 已提交
9
    </div>
P
Pan 已提交
10
    <div class="editor-content" v-html="content"></div>
P
init  
Pan 已提交
11 12
  </div>
</template>
P
Pan 已提交
13

P
init  
Pan 已提交
14
<script>
P
refine  
Pan 已提交
15
import Tinymce from '@/components/Tinymce'
P
init  
Pan 已提交
16

P
Pan 已提交
17
export default {
P
Pan 已提交
18
  name: 'tinymce-demo',
P
Pan 已提交
19 20 21
  components: { Tinymce },
  data() {
    return {
花裤衩 已提交
22 23 24 25 26 27 28 29
      content:
      `<h1 style="text-align: center;">Welcome to the TinyMCE demo!</h1>
      <ul>
        <li>Our <a href="//www.tinymce.com/docs/">documentation</a> is a great resource for learning how to configure TinyMCE.</li>
        <li>Have a specific question? Visit the <a href="https://community.tinymce.com/forum/">Community Forum</a>.</li>
        <li>We also offer enterprise grade support as part of <a href="https://tinymce.com/pricing">TinyMCE premium subscriptions</a>.</li>
      </ul>
      `
P
Pan 已提交
30
    }
P
Pan 已提交
31 32
  }
}
P
init  
Pan 已提交
33 34
</script>

P
Pan 已提交
35 36 37 38 39 40
<style scoped>
.editor-content{
  margin-top: 20px;
}
</style>

P
init  
Pan 已提交
41