
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
summernote-editor-vue3
Advanced tools
A VueJs 3 component for use Summernote WYSIWYG
// npm install
npm install summernote-editor-vue3 --save
You must be have jQuery
at window.$
and install summernote by yourself.
import { fileURLToPath, URL } from 'node:url'
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import inject from '@rollup/plugin-inject';
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
inject({
$: [ 'jquery', '*' ],
jQuery: 'jquery',
}),
vue(),
],
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url))
}
}
})
// on main.js
import * as jQuery from "jquery";
// define & and jQuery on the global window object
Object.assign(window, { $: jQuery, jQuery });
//import summernote lite
import "summernote/dist/summernote-lite.min";
// import css summernote lite
import "summernote/dist/summernote-lite.min.css";
//Add import for change default lang to spanish if not add this line default lang is English
import "summernote/dist/lang/summernote-es-ES.min";
import SummernoteEditor from 'summernote-editor-vue-3';
// import SummernoteEditor
import SummernoteEditor from 'summernote-editor-vue-3';
const vueApp = createApp({});
vueApp.component('SummernoteEditor', SummernoteEditor);
// import SummernoteEditor
import SummernoteEditor from 'summernote-editor-vue-3';
<template>
<SummernoteEditor
v-model="myValue"
@update:modelValue="summernoteChange($event)"
@summernoteImageLinkInsert="summernoteImageLinkInsert"
/>
</template>
<script>
export default {
// declare SummernoteEditor
components: {SummernoteEditor},
data() {
return {
myValue: '',
}
},
methods: {
summernoteChange(newValue) {
console.log("summernoteChange", newValue);
},
summernoteImageLinkInsert(...args) {
console.log("summernoteImageLinkInsert()", args);
},
}
}
</script>
:config
: option[]
window.SUMMERNOTE_DEFAULT_CONFIGS
@update:modelValue
summernote bare events
"summernote.change": "@summernoteChange"
"summernote.image.link.insert": "@summernoteImageLinkInsert"
FAQs
A vuejs 3 component for Summernote library
The npm package summernote-editor-vue3 receives a total of 12 weekly downloads. As such, summernote-editor-vue3 popularity was classified as not popular.
We found that summernote-editor-vue3 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.