• Stars
    star
    319
  • Rank 131,491 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

editor.js for Vue users

vue-editor-js

Wallaby.js

vue-editor-js is editorjs wrapper component.

Please review this first. https://editorjs.io/

For before 2.0.0 version users.

This plugins is a wrapper component for editorjs. If you need to use the plugin for editor.js then import it and set the config property.

Please See the Demo.vue

For before 1.0.0 version users.

Please use Vue.use vue-editor-js in main.js.

Supported Plugins

Installation

# NPM
npm install --save vue-editor-js

# or Yarn
yarn add vue-editor-js

Usage

In main.js

// ...
import Editor from 'vue-editor-js'

Vue.use(Editor)
// ...

In Nuxt.js

// in nuxt.config.js
plugins: [
  {
    src: '~/plugins/vue-editor.js', ssr: false
  }
],

// in ~/plugins/vue-editor.js
import Vue from 'vue'
import Editor from 'vue-editor-js'

Vue.use(Editor)
  <editor ref="editor" :config="config" :initialized="onInitialized"/>

Define the initialization function to get the instance of editor.js when initializing

If you are confused with using it with Nuxt, please see here

Local import

If you wish to only import Editor on a single component then you can do so by following the instructions below

  1. Make sure to install @vue/composition-api
# NPM
npm i --save @vue/composition-api

# or Yarn
yarn add @vue/composition-api
  1. In main.js:
import Vue from 'vue'
import VueCompositionApi from '@vue/composition-api'

Vue.use(VueCompositionApi)
  1. Don't import anything from 'vue-editor-js' in main.js
  2. In your component:
import { Editor } from 'vue-editor-js'

export default {
  // ...
  components: {
    Editor,
  },
  // ...
}

Tools

Supported tools

Same as in Supported Plugins, but with different naming

  • header
  • list
  • code
  • inlineCode
  • personality
  • embed
  • linkTool
  • marker
  • table
  • raw
  • delimiter
  • quote
  • image
  • warning
  • paragraph
  • checklist

Usage

  1. Install the editorjs tool
# NPM
npm install --save @editorjs/header

# or Yarn
yarn add @editorjs/header
  1. Insert the package into the config prop
<editor
    ...
    :config="{
        tools: {
          header: require('@editorjs/header')
        }
    }"
/>

Saving Example Code

<template>
	<div id="app">
		<Editor ref="editor" :config="config" />

		<button @click="invokeSave">Save</button>
	</div>
</template>

<script>
	export default {
		methods: {
			invokeSave() {
				this.$refs.editor._data.state.editor.save()
					.then((data) => {
						// Do what you want with the data here
						console.log(data)
					})
					.catch(err => { console.log(err) })
			}
		},
	}
</script>

Upload Image (>= 1.1.0)

for uploading images, You will need a backend for processing the images. vue-editor-js provides a special config prop for easability. If you are testing your server to upload an image, please see server example.

<editor :config="config" />

<script>
...
data() {
  return {
      config: {
        image: {
          // Like in https://github.com/editor-js/image#config-params
          endpoints: {
            byFile: 'http://localhost:8090/image',
            byUrl: 'http://localhost:8090/image-by-url',
          },
          field: 'image',
          types: 'image/*',
        },
      }
  }
}
</script>

upload personality avatar ( >= 2.0.1)

  config: {
    personality: {
      endpoints: 'http://localhost:8090/image'
    }

Other props:

  • customTools - Object with name (key) and class of a custom tool (value)

Enjoy editorjs with Vue.js Project 🎉

How to Contribute?

  1. fork this project.
  2. edit code.
  3. PR

OR

  1. Just submit a issue!

Contributors

Wallaby.js

Wallaby.js

This repository contributors are welcome to use Wallaby.js OSS License to get test results immediately as you type, and see the results in your editor right next to your code.

More Repositories

1

vue-component-generator

Vue component generator :)
JavaScript
146
star
2

gitrelease-app

Release Tracker for github
JavaScript
50
star
3

flutter_foreground_service_plugin

Java
40
star
4

express-generator-with-vue-cli

JavaScript
33
star
5

kemal-vue-chat

this is experimental repo for Kemal and Vue.js (+ WebSocket)
Crystal
32
star
6

mac-dev-setup

Mac 개발환경 초기 설정 저장용입니다 🐣
Ruby
24
star
7

Resume-Vue

simple resume based on Vue 2
JavaScript
24
star
8

Hided-Job-board-frontend

Hided Job board - using Vue 2.0 example
Vue
19
star
9

template_flutter_listing_app

Dart
17
star
10

little-electron-app

electron-builder를 이용한 일렉트론 자동 업데이트 앱
JavaScript
17
star
11

SAM.js-korean

SAM.js 패턴 한국어 번역본 저장소입니다
HTML
16
star
12

nuxt-auth-module-example

Vue
15
star
13

flutter_bottom_navigation_app

BottomNavigation App using Flutter
Dart
13
star
14

vscode-vue-pack

This extensions pack has awesome VSCode Extensions :)
13
star
15

rescript-example-for-starter

rescript와 react 예제 모음
ReScript
12
star
16

js-library-starter

JavaScript library boilerplate using webpack
JavaScript
12
star
17

amber-realworld-example-app

WIP. amber framework realworld example app
Crystal
10
star
18

flutter_starter

Flutter Application starter using get ecosystem
Dart
10
star
19

vue-wallaby-webpack-template

Wallaby testing template with https://github.com/wallabyjs/wallaby-vue-compiler
JavaScript
9
star
20

journapi_flutter

Dart
8
star
21

toss-api-node

Node.js용 TOSS 결제 API 구현체입니다
JavaScript
8
star
22

realtime-shop-backend

Express, TypeORM, EJS based MVC realtime shop (WIP)
HTML
7
star
23

wanted-jobs

2019년 05월 31일자 wanted의 구인
Vue
7
star
24

vue-editor-on-nuxt

Vue
7
star
25

adonuxt-4-vuetify-boilerplate

Adonis 4 + Nuxt + Vuetify
JavaScript
7
star
26

vue-tingle

Minimalistic modal component for Vue.js 2.0+
JavaScript
7
star
27

electron-frameless-frame

WIP
JavaScript
6
star
28

flutter_provider_example

provider 패키지를 이용한 상태관리 예제
Dart
6
star
29

flutter_plugin_helloworld

`Utils.getHelloWorld()` 밖에 없는 플러그인
Dart
6
star
30

gravatarcr

Gravatar URL library for crystal language 🔮
Crystal
6
star
31

what-to-do

앞으로 해야할 일 또는 생각하는 걸 보관하기 위함
6
star
32

universal-nuxt-repository

Experimental Universal Nuxt using repository
Vue
5
star
33

today-we-learned

WIP : Social today i learned
Crystal
5
star
34

word_break_text

A Flutter Text widget support word break for CJK
Dart
5
star
35

Flutter_Weekly_TimeTable

weekly timetable widget plugin for flutter
Dart
4
star
36

flutter_emojicloud

Dart
4
star
37

server-driven-ui-admin

Vue
4
star
38

nuxt-mongodb-sample-k8s

Vue
4
star
39

nuxt-k8s

Nuxt앱을 minikube를 이용해 컨테이너화 합니다
Vue
4
star
40

koa-2-api-boilerplate

JavaScript
4
star
41

vue-editor-js-imageserver

Image upload server for vue-editor-js
JavaScript
4
star
42

github-kv

GitHub as a Key-Value Store
JavaScript
4
star
43

vue-cli-todomvc-with-e2e

JavaScript
4
star
44

storyboard-vue-button

Please See guide :)
JavaScript
4
star
45

typescript-express-jest-mongoose-boilerplate

TypeScript
3
star
46

sticky-notes

Vue
3
star
47

flutter_lo-fi_layout

make layout using placeholder
Dart
3
star
48

nuxt-firebase

WIP
Vue
3
star
49

amber-microblog

Microblog example using Amber Framework
Crystal
3
star
50

ES6-SPA-Random-User

JavaScript
3
star
51

github-q

Github Issue Viewer based on "issue query"
JavaScript
3
star
52

flutter-sample-contacts

Example for flutter ListView
Dart
3
star
53

example-movie-backend

JavaScript
3
star
54

flutter_app_boilerplate

Dart
3
star
55

meteor-ratchet

ratchet for meteor
CSS
3
star
56

github-notification-mobile

inspired by [gitify](https://github.com/manosim/gitify-mobile), port
Dart
3
star
57

flutter-xkcd-viewer

Flutter App for xkcd
Dart
2
star
58

whattodo-app

WIP
Vue
2
star
59

among_us_avatar_flutter

Dart
2
star
60

koa-rest-api-starter-typescript

Koa REST api starter kit using TypeScript
TypeScript
2
star
61

experimental-nuxt-spa

Vue
2
star
62

news-api

JavaScript
2
star
63

iview-admin

WIP :) https://github.com/ChangJoo-Park/what-to-do/issues/37
2
star
64

adonis-fullstack-stimulus-app

The fullstack application boilerplate for Adonisjs with Stimulus
JavaScript
2
star
65

uar

Vue.js / NativeScript 등 문서를 보관하는 곳 입니다 [작업중] =>
Batchfile
2
star
66

rails-webpacker-vuejs-example

Ruby
2
star
67

flutter_rust_example

Flutter + Rust example app. Flutter => UI / Rust => Serivce.
Dart
2
star
68

news-web

JavaScript
2
star
69

BetterWiki

Wiki inspired by MatterWiki
TypeScript
2
star
70

changjoo-park.github.io_wiki

HTML
2
star
71

uuid-v4-generator-cocoa

Swift
2
star
72

flutter_list_provider_example

Dart
2
star
73

HIMM

Here Is My Memory
JavaScript
2
star
74

am-i-disturbing-u

JavaScript
2
star
75

flutter_firebase_auth_template

Dart
2
star
76

nest-docs-ko

HTML
2
star
77

toss_full_emoji

HTML
2
star
78

stimulusjs

2
star
79

SimpleModal

Very simple modal using jQuery -
JavaScript
2
star
80

Portolio

Ruby
2
star
81

flask-vue-cli-example

JavaScript
1
star
82

firebase-functions-express

experimental repo : Firebase cloud functions + hosting + Express
HTML
1
star
83

vue-cdn-sfc_demo

JavaScript
1
star
84

github-widget

Swift
1
star
85

google_login_flutter

Dart
1
star
86

animated_appear

C++
1
star
87

Duration

Make duration for deno. It is successor of dart's Duration
TypeScript
1
star
88

flutter_app_sample

Dart
1
star
89

dartlang-korea

Dart 언어 한국어 자료 저장소입니다
1
star
90

my_equipment

Dart
1
star
91

DrawTheLots

NativeScript 제비뽑기 앱입니다 | Vue.js 2회 미트업 추첨용
JavaScript
1
star
92

typescript-express-todomvc-example

WIP
TypeScript
1
star
93

adonuxt-4-testing

JavaScript
1
star
94

typeorm-migration-articles-tags

TypeScript
1
star
95

Momonga

Text Editor-like Weekly Planner
CSS
1
star
96

flutter_json_serializable

using build_runner + json_serializer + json_annotation
Dart
1
star
97

vscode-vue-cli-ui

Open Vus CLI UI on vscode (experimental)
JavaScript
1
star
98

survey-website

Vue
1
star
99

vue-monaco-example

Vue
1
star
100

aidu-backend

JavaScript
1
star