Gathering detailed insights and metrics for jodit-vue
Gathering detailed insights and metrics for jodit-vue
Gathering detailed insights and metrics for jodit-vue
Gathering detailed insights and metrics for jodit-vue
jodit
Jodit is an awesome and useful wysiwyg editor with filebrowser
jodit-react
Jodit is awesome and usefully wysiwyg editor with filebrowser
jodit-pro-react
Jodit PRO is awesome and usefully wysiwyg editor with filebrowser
jodit-angular
> Hey. Due to the fact that I do not use Angular in my projects, I cannot fix plugin errors in a timely manner. If you want the plugin to develop, send PR or better become a contributor
npm install jodit-vue
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
78 Stars
147 Commits
20 Forks
5 Watching
4 Branches
7 Contributors
Updated on 21 Nov 2024
Minified
Minified + Gzipped
JavaScript (57.12%)
Vue (37.07%)
HTML (5.81%)
Cumulative downloads
Total Downloads
Last day
-35.6%
308
Compared to previous day
Last week
11.1%
2,490
Compared to previous week
Last month
20.8%
9,628
Compared to previous month
Last year
79.5%
95,989
Compared to previous year
Use version 2.* for Vue 2
Use version 3.* for Vue 3
Install Jodit Vue:
npm install jodit-vue --save
// or with Yarn
yarn add jodit-vue
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.
1import 'jodit/build/jodit.min.css' 2import Vue from 'vue' 3import JoditVue from 'jodit-vue' 4 5Vue.use(JoditVue)
Instead of using Vue.use(JoditVue)
you can use the component locally
1<template> 2 <div id="app"> 3 <jodit-editor v-model="content" /> 4 </div> 5</template> 6 7<script> 8import 'jodit/build/jodit.min.css' 9import { JoditEditor } from 'jodit-vue' 10 11export default { 12 name: 'app', 13 14 components: { JoditEditor }, 15 16 data () { 17 return { 18 content: '<h1>Hello Jodit Vue</h1>' 19 } 20 } 21} 22</script>
You can check and test it on Codesanbox too.
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.
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 |
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.
1<template> 2 <div id="app"> 3 <jodit-editor v-model="content" :buttons="buttons" /> 4 </div> 5</template> 6 7<script> 8import 'jodit/build/jodit.min.css' 9import { JoditEditor } from 'jodit-vue' 10 11export default { 12 name: 'app', 13 14 components: { JoditEditor }, 15 16 data () { 17 return { 18 content: '<h1>Hello Jodit Vue</h1>', 19 buttons: ['source', 'image', '|', 'bold', 'underline', 'italic'] 20 } 21 } 22} 23</script>
If you need to create custom buttons to the editor, you can create them and provide the component with an array
1<template> 2 <div id="app"> 3 <jodit-editor v-model="content" :buttons="buttons" :extra-buttons="customButtons" /> 4 </div> 5</template> 6 7<script> 8import 'jodit/build/jodit.min.css' 9import { JoditEditor } from 'jodit-vue' 10 11export default { 12 name: 'app', 13 14 components: { JoditEditor }, 15 16 data () { 17 return { 18 content: '<h1>Hello Jodit Vue</h1>', 19 buttons: ['source', 'image', '|', 'bold', 'underline', 'italic'], 20 customButtons: [ 21 { 22 name: 'insertDate', 23 iconURL: 'http://xdsoft.net/jodit/logo.png', 24 exec: function (editor) { 25 editor.selection.insertHTML((new Date).toDateString()); 26 } 27 } 28 ] 29 } 30 } 31} 32</script>
To create custom buttons, check the Jodit Editor Docs
This config allows you to pass all the other configurations found here to customize your editor
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:
1<template> 2 <div id="app"> 3 <jodit-editor v-model="content" :plugins="plugins" /> 4 </div> 5</template> 6 7<script> 8import 'jodit/build/jodit.min.css' 9import { JoditEditor } from 'jodit-vue' 10 11export default { 12 name: 'app', 13 14 components: { JoditEditor }, 15 16 data () { 17 return { 18 content: '<h1>Hello Jodit Vue</h1>', 19 plugins: [ 20 { 21 name: 'example', 22 callback: function (editor) { 23 editor.events.on('afterInit', function () { 24 console.warn('Example plugin has beed initialized, check Jodit documentation for more details.') 25 }) 26 } 27 } 28 ] 29 } 30 } 31} 32</script>
To add plugins Jodit Vue uses Jodit.plugins.add
API.
Check Jodit documentation and examples how to implement plugins.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 2/6 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More