
Product
Introducing Data Exports
Export Socket alert data to your own cloud storage in JSON, CSV, or Parquet, with flexible snapshot or incremental delivery.
@hydrabot/slate-vue
Advanced tools
in npm
npm install slate-vue
in yarn
yarn add slate-vue
import
import Vue from 'vue'
import { SlatePlugin } from 'slate-vue';
Vue.use(SlatePlugin)
use
<template>
<Slate :value="value">
<Editable placeholder="Enter some plain text..."></Editable>
</Slate>
</template>
<script>
import {Slate, Editable} from 'slate-vue'
// this value is for editor
const initialValue = [
{
children: [
{ text: 'This is editable plain text, just like a <textarea>!' },
],
},
]
export default {
name: 'index',
components: {
Slate,
Editable
},
data() {
return {
value: JSON.stringify(initialValue)
}
}
};
</script>
Vue's jsx and tsx grammar is recommend, but SFC is also supported.
Most of the usage is same with slate-react. Here are same difference as guideline:
this.$editor
If you want to apply some plugins(e.g. slate-history), use editorCreated hook:
Vue.use(SlatePlugin, {
editorCreated(editor) {
withHistory(editor)
}
})
It will be called after each editor created.
ReturnType must be any legal type which is equal with the first argument in Vue's createElement, please see.
Use Vue.mixin
import {SelectedMixin, FocusedMixin} from 'slate-vue'
And you will get selected, focused data in your component
Use global inject: inject: ['readOnly]
And you will get readOnly data in your component
import {useEffect, useRef} from 'slate-vue'
Same as react hooks. Forked from vue-hooks.
import {fragment} from 'slate-vue'
Forked from vue-fragment
import {VueEditor} from 'slate-vue'
Same api with react-editor
If your component is related to the editor(like toolbar), you must add slateMixin for rerender:
import {SlateMixin} from 'slate-vue'
For Nuxtjs, you must add slate-vue and vue-tsx-support into your transpile option in nuxt.config.js
build: {
transpile: ['slate-vue', 'vue-tsx-support']
}
FAQs
## Install
We found that @hydrabot/slate-vue demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers 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.

Product
Export Socket alert data to your own cloud storage in JSON, CSV, or Parquet, with flexible snapshot or incremental delivery.

Research
/Security News
Bitwarden CLI 2026.4.0 was compromised in the Checkmarx supply chain campaign after attackers abused a GitHub Action in Bitwarden’s CI/CD pipeline.

Research
/Security News
Docker and Socket have uncovered malicious Checkmarx KICS images and suspicious code extension releases in a broader supply chain compromise.