@packy-tang/vue-tinymce
A simple vue-based tinymce component
Last updated 2 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-tinymce

npm version vue vue NPM downloads

A vue component for TinyMCE

Features

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

How to use

setup

npm install @packy-tang/vue-tinymce

use

<template>
    <script src="//cdn.bootcss.com/tinymce/4.9.4/tinymce.min.js"></script>
    <div id="app">
        <vue-tinymce
            ref="tinymce"
            v-model="content"
            :setting="setting">
        </vue-tinymce>
    </div>
</template>
<script>
    import Vue from 'vue';
    import { default as VueTinymce, TinymceSetting } from '@packy-tang/vue-tinymce';

    Vue.use(VueTinymce)

    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;"
                }
            }
        }
    })
</script>

Get Editor to do something

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

Run build

// install
npm i

npm run build
//or
npm run watch

Current Tags

  • 0.2.1                                ...           latest (2 months ago)

3 Versions

  • 0.2.1                                ...           2 months ago
  • 0.2.0                                ...           3 months ago
  • 0.1.5                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 110
Last Day 1
Last Week 38
Last Month 140
Dependencies (1)
Dev Dependencies (19)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |