
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
vue-trumbowyg
Advanced tools
Vue.js component for Trumbowyg WYSIWYG editor
Vue.js version | Package version | Branch |
---|---|---|
2.x | 3.x | 3.x |
3.x | 4.x | master |
# yarn
yarn add vue-trumbowyg
# npm
npm install vue-trumbowyg
v-model
value
<template>
<div>
<trumbowyg v-model="content" :config="config" class="form-control" name="content"></trumbowyg>
</div>
</template>
<script>
// Import this component
import Trumbowyg from 'vue-trumbowyg';
// Import editor css
import 'trumbowyg/dist/ui/trumbowyg.css';
export default {
data () {
return {
content: null,
config: {
// Get options from
// https://alex-d.github.io/Trumbowyg/documentation
}
}
},
components: {
Trumbowyg
}
}
</script>
import Vue from 'vue';
import VueTrumbowyg from 'vue-trumbowyg';
import 'trumbowyg/dist/ui/trumbowyg.css';
app.use(VueTrumbowyg);
This will register a global component <trumbowyg>
<trumbowyg v-model="body" @tbw-blur="yourMethod"></trumbowyg>
tbw
and separated with a dash, for example: tbw-focus
The component accepts these props:
Attribute | Type | Default | Description |
---|---|---|---|
v-model | String / null | null | Set or Get editor value (required) |
disabled | Boolean | false | Enable/disable editor |
config | Object | {} | Editor configuration options |
svg-path | String, Boolean | import 'trumbowyg/dist/ui/icons.svg' | Set custom svg icon file URL |
<!-- Editor dependencies-->
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5"></script>
<!-- Editor itself -->
<script src="https://cdn.jsdelivr.net/npm/trumbowyg@2"></script>
<link href="https://cdn.jsdelivr.net/npm/trumbowyg@2/dist/ui/trumbowyg.min.css" rel="stylesheet">
<!-- Vue js -->
<script src="https://cdn.jsdelivr.net/npm/vue@3"></script>
<!-- Lastly add this package -->
<script src="https://cdn.jsdelivr.net/npm/vue-trumbowyg@4"></script><
<script>
// Initialize as global component
yourAppInstance.component('Trumbowyg', VueTrumbowyg.default);
</script>
>=10.13
and yarn >=1.x
pre-installedyarn install
yarn start
http://localhost:9000
in your default web browserPlease see CHANGELOG for more information what has changed recently.
MIT License
FAQs
Vue.js component for trumbowyg WYSIWYG editor
The npm package vue-trumbowyg receives a total of 2,247 weekly downloads. As such, vue-trumbowyg popularity was classified as popular.
We found that vue-trumbowyg 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.