Skip to content

Latest commit

 

History

History
92 lines (71 loc) · 1.51 KB

README.md

File metadata and controls

92 lines (71 loc) · 1.51 KB

Redactor X Vue.js Component

Vue-redactorx helps Redactor X to work as a Vue.js component. The Redactor X Vue component is under MIT license. However, to use this component, you should purchase a Redactor X license.

Please see the buying page and License Agreement.

Compatibility

  • Vue.js 2.x

Intialization

One Way Binding

Import

import '/your-dist-path/redactorx.min.js';
import './vue-redactorx.js';

Component

<div id="app">
    <RedactorX v-model="content" :config="configOptions"></RedactorX>
    {{ content }}
</div>

App

new Vue({
    el: '#app',
    data() {
        return {
            content: '<h1>Hello and welcome</h1>',
            configOptions: {}
        }
    }
});

Two Way Binding

Import

import '/your-dist-path/redactorx.min.js';
import './vue-redactorx.js';

Component

<div id="app">
    <RedactorX v-model="content" :config="configOptions"></RedactorX>
    <textarea v-model="content"></textarea>
</div>

App

new Vue({
    el: '#app',
    data() {
        return {
            content: '<h1>Hello and welcome</h1>',
            configOptions: {}
        }
    }
});

Call with options

new Vue({
    el: '#app',
    data() {
        return {
            content: '<h1>Hello and welcome</h1>',
            configOptions: {
                plugins: ['table']
            }
        }
    }
});