All Projects → WendellAdriel → jodit-vue

WendellAdriel / jodit-vue

Licence: MIT license
Vue wrapper for Jodit Editor

Programming Languages

javascript
184084 projects - #8 most used programming language
Vue
7211 projects

Projects that are alternatives of or similar to jodit-vue

Flutter Quill
Rich text editor for Flutter
Stars: ✭ 177 (+195%)
Mutual labels:  wysiwyg, wysiwyg-editor
wysiwyg-editor-node-sdk
Node.JS SDK to ease the integration of Froala WYSIWYG Editor on server side.
Stars: ✭ 25 (-58.33%)
Mutual labels:  wysiwyg, wysiwyg-editor
Ng Quill
AngularJS Component for Quill rich text editor
Stars: ✭ 223 (+271.67%)
Mutual labels:  wysiwyg, wysiwyg-editor
Rich Markdown Editor
The open source React and Prosemirror based markdown editor that powers Outline. Want to try it out? Create an account:
Stars: ✭ 2,468 (+4013.33%)
Mutual labels:  wysiwyg, wysiwyg-editor
vuejs2-wysiwyg
jQuery Summernote WYSIWYG Editor implementation for REST based single page applications that run on vue.js 2.0.
Stars: ✭ 15 (-75%)
Mutual labels:  vue2, wysiwyg-editor
Pell
📝 the simplest and smallest WYSIWYG text editor for web, with no dependencies
Stars: ✭ 11,653 (+19321.67%)
Mutual labels:  wysiwyg, wysiwyg-editor
wysiwyg-editor-python-sdk
Python SDK to ease the integration of Froala WYSIWYG Editor on server side.
Stars: ✭ 20 (-66.67%)
Mutual labels:  wysiwyg, wysiwyg-editor
Brickyeditor
WYSIWYG block editor jQuery plugin.
Stars: ✭ 112 (+86.67%)
Mutual labels:  wysiwyg, wysiwyg-editor
svelte-slate
slate svelte view layer
Stars: ✭ 43 (-28.33%)
Mutual labels:  wysiwyg, wysiwyg-editor
nova-froala-field
A Laravel Nova Froala WYSIWYG Editor Field.
Stars: ✭ 110 (+83.33%)
Mutual labels:  wysiwyg, wysiwyg-editor
Wangeditor
wangEditor —— 轻量级web富文本框
Stars: ✭ 12,792 (+21220%)
Mutual labels:  wysiwyg, wysiwyg-editor
bangle.dev
Collection of higher level rich text editing tools. It powers the local only note taking app https://bangle.io
Stars: ✭ 541 (+801.67%)
Mutual labels:  wysiwyg, wysiwyg-editor
Awesome Wysiwyg
A curated list of awesome WYSIWYG editors.
Stars: ✭ 1,801 (+2901.67%)
Mutual labels:  wysiwyg, wysiwyg-editor
Lite Editor
A Modern WYSIWYG Editor especially for inline elements
Stars: ✭ 169 (+181.67%)
Mutual labels:  wysiwyg, wysiwyg-editor
Summernote
Super simple WYSIWYG editor
Stars: ✭ 10,486 (+17376.67%)
Mutual labels:  wysiwyg, wysiwyg-editor
Textbus
基于组件 + 数据驱动的现代富文本编辑器
Stars: ✭ 242 (+303.33%)
Mutual labels:  wysiwyg, wysiwyg-editor
Nicedit
WYSIWYG editor
Stars: ✭ 86 (+43.33%)
Mutual labels:  wysiwyg, wysiwyg-editor
Tiptap
The headless editor framework for web artisans.
Stars: ✭ 13,629 (+22615%)
Mutual labels:  wysiwyg, wysiwyg-editor
ngx-wall
Helps build content editor for note-taking application
Stars: ✭ 78 (+30%)
Mutual labels:  wysiwyg, wysiwyg-editor
wysihtml5-rails
A wysiwyg text editor for use in the Rails asset pipeline
Stars: ✭ 28 (-53.33%)
Mutual labels:  wysiwyg, wysiwyg-editor

Jodit Vue

license All Contributors

version downloads size gzip size

Watch on GitHub Star on GitHub Tweet

Vue Wrapper for the Jodit Editor

How to use

Install Jodit Vue:

npm install jodit-vue --save
// or with Yarn
yarn add jodit-vue

Import and use it

Since this component is just a wrapper, you need to include the css of the Jodit Editor on your app for it to work properly, if you're using vue-cli to create your app, or another build system you can import it directly or add a link tag with the css file provided by the Jodit Editor package.

import 'jodit/build/jodit.min.css'
import Vue from 'vue'
import JoditVue from 'jodit-vue'

Vue.use(JoditVue)

Instead of using Vue.use(JoditVue) you can use the component locally

<template>
    <div id="app">
        <jodit-editor v-model="content" />
    </div>
</template>

<script>
import 'jodit/build/jodit.min.css'
import { JoditEditor } from 'jodit-vue'

export default {
    name: 'app',

    components: { JoditEditor },

    data () {
        return {
            content: '<h1>Hello Jodit Vue</h1>'
        }
    }
}
</script>

You can check and test it on Codesanbox too.

Using without a build system

If you don't use a build system on your app, you can also use Jodit Vue without problems, check and test it on this JsFiddle.

Component Properties

If you pass only the v-model for the component, it will load all the editor features, if you want to customize it, you can do it with its properties that are listed below, but all of them are not required, just if you want to customize your editor that you will need them:

Property Type Default Value Description
buttons Array null The buttons that you want to show on toolbar, if this is not provided, all the buttons will be shown
extraButtons Array null If you need to create and display custom buttons you can pass an array with your custom buttons to this property
config Object {} The config object that has all the other configurations for the editor
plugins Array [] If you need to create custom plugins you can pass array of plugins to this property

Buttons property

When providing the buttons to show on the editor you will need to provide an array with the buttons that you want to show. The button names can be found here. You can also pass a | to put a divider between the buttons.

<template>
    <div id="app">
        <jodit-editor v-model="content" :buttons="buttons" />
    </div>
</template>

<script>
import 'jodit/build/jodit.min.css'
import { JoditEditor } from 'jodit-vue'

export default {
    name: 'app',

    components: { JoditEditor },

    data () {
        return {
            content: '<h1>Hello Jodit Vue</h1>',
            buttons: ['source', 'image', '|', 'bold', 'underline', 'italic']
        }
    }
}
</script>

Extra Buttons property

If you need to create custom buttons to the editor, you can create them and provide the component with an array

<template>
    <div id="app">
        <jodit-editor v-model="content" :buttons="buttons" :extra-buttons="customButtons" />
    </div>
</template>

<script>
import 'jodit/build/jodit.min.css'
import { JoditEditor } from 'jodit-vue'

export default {
    name: 'app',

    components: { JoditEditor },

    data () {
        return {
            content: '<h1>Hello Jodit Vue</h1>',
            buttons: ['source', 'image', '|', 'bold', 'underline', 'italic'],
            customButtons: [
                {
                    name: 'insertDate',
                    iconURL: 'http://xdsoft.net/jodit/logo.png',
                    exec: function (editor) {
                        editor.selection.insertHTML((new Date).toDateString());
                    }
                }
            ]
        }
    }
}
</script>

To create custom buttons, check the Jodit Editor Docs

Config property

This config allows you to pass all the other configurations found here to customize your editor

Plugins property

Plugins property allows you to pass array of plugin objects with name and callback which will be initialized when Jodit is initialized. Plugins are initialized globally and it will added to all instances of Jodit editor. For example:

<template>
    <div id="app">
        <jodit-editor v-model="content" :plugins="plugins" />
    </div>
</template>

<script>
import 'jodit/build/jodit.min.css'
import { JoditEditor } from 'jodit-vue'

export default {
    name: 'app',

    components: { JoditEditor },

    data () {
        return {
            content: '<h1>Hello Jodit Vue</h1>',
            plugins: [
              {
                name: 'example',
                callback: function (editor) {
                  editor.events.on('afterInit', function () {
                    console.warn('Example plugin has beed initialized, check Jodit documentation for more details.')
                  })
                }
              }
            ]
        }
    }
}
</script>

To add plugins Jodit Vue uses Jodit.plugins.add API. Check Jodit documentation and examples how to implement plugins.

Credits

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].