All Projects → marsprince → slate-vue

marsprince / slate-vue

Licence: MIT license
slate.js implement for Vue2 and Vue3

Programming Languages

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

Projects that are alternatives of or similar to slate-vue

slate-react-dnd-plugin
No description or website provided.
Stars: ✭ 35 (-65.69%)
Mutual labels:  slatejs
slate-operational-transform
Slate Operational Transform Demo (used in production at Narration Box)
Stars: ✭ 34 (-66.67%)
Mutual labels:  slatejs
svelte-slate
slate svelte view layer
Stars: ✭ 43 (-57.84%)
Mutual labels:  slatejs
volto-slate
An alternative text editor for Volto, capable of completely replacing the default richtext editor while offering enhanced functionality and behavior.
Stars: ✭ 22 (-78.43%)
Mutual labels:  slatejs
slate-yjs-example
Minimal example project for slate-yjs
Stars: ✭ 43 (-57.84%)
Mutual labels:  slatejs
remark-slate-transformer
remark plugin to transform remark syntax tree (mdast) to Slate document tree, and vice versa. Made for WYSIWYG markdown editor.
Stars: ✭ 62 (-39.22%)
Mutual labels:  slatejs

Slate-vue

Build Status NPM Version NPM Size

An implement for slate supported vue2 and vue3(in development). Most of the slate-react's components can be easily migrated by no code change.

All slate-react's example is supported now.

For principles's question, Please read slate's docs first!

Install

in npm

npm install slate-vue

in yarn

yarn add slate-vue

Usage

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>

See full vue2.x document in slate-vue

Examples

See all examples in online example.

See all example code in pages

Issues

You can use this codesandbox template to reproduce problems.

Environment Support

Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
testing testing 86.0+ testing

License

MIT © marsprince

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].