@packy-tang/vue-tinymce
tinymce by vue component
Last updated 10 months ago by packy-tang .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @packy-tang/vue-tinymce 
SYNC missed versions from official npm registry.

vue-tinymce

vue vue

A vue component for TinyMCE

Features

  • [x] v-model support
  • [x] self managed id
  • [ ] add more tinymce example

How to use

setup

npm install @packy-tang/vue-tinymce

use

import Vue from 'vue';
import { VueTinymce , TinymceSetting } from '@packy-tang/vue-tinymce';

new Vue({
    el: '#app',
    data: function(){
        return {
            content: '<p>html content</p>',
            setting: {
                ...TinymceSetting,
                height: 200,
                language_url: "langs/zh_CN.js",
                block_formats: "Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;"
            }
        }
    }
})

template

<div id="app">
    <vue-tinymce
        ref="tinymce"
        v-model="content"
        :setting="setting">
    </vue-tinymce>
</div>
<!-- in last -->
<script src="node_modules/tinymce/tinymce.min.js"></script>

Get Editor to do something

const bm = this.$refs.tinymce.editor.selection.getBookmark();
console.log(bm);

Run Example

npm i
npm run dev

Run build

npm i
npm run build

Current Tags

  • 0.1.5                                ...           latest (10 months ago)

1 Versions

  • 0.1.5                                ...           10 months ago
Maintainers (1)
Downloads
Today 1
This Week 11
This Month 26
Last Day 3
Last Week 7
Last Month 55
Dependencies (2)
Dev Dependencies (14)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |