Skip to content

imperavi/vue-article

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Article Editor Vue.js Component

Vue-article helps Article Editor to work as a Vue.js component. The Article Vue component is under MIT license. However, to use this component, you should purchase an Article license.

Please see the buying page and License Agreement.

Compatibility

  • Vue.js 2.x

Intialization

One Way Binding

Import

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

Component

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

App

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

Two Way Binding

Import

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

Component

<div id="app">
    <article-editor v-model="content" :config="configOptions"></article-editor>
    <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: ['blockcode'],
                editor: {
                    focus: true
                }
            }
        }
    }
});

Call with events

new Vue({
    el: '#app',
    data() {
        return {
            content: '<h1>Hello and welcome</h1>',
            configOptions: {
                 subscribe: {
                    'app.start': function() {
                        console.log('Article started!');
                    }
                }
            }
        }
    }
});

About

Article Editor Vue.js Component

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages