LoginSignup
5
6

More than 3 years have passed since last update.

Vue.jsでEditor.jsプラグインを使いたい

Last updated at Posted at 2019-11-08

Vue.jsでEditor.jsプラグインを使いたい

メモ

家に帰ったら正式なやつ書く
取り敢えず導入まで

インストールする

$ npm install @editorjs/editorjs
or
$ yarn add @editorjs/editorjs

呼び出す

<template>
  <div class="hoge">
    <div id="codex-editor" />
  </div>
</template>

<script>
import EditorJS from '@editorjs/editorjs'

export default {
  data() {
    return {
      editor: {}
    }
  },
  methods: {
    // Editor.js関連
    doEditor() {
      this.editor = new  EditorJS({
        holder: 'codex-editor',
      })
    }  
  },
  mounted() {
    this.doEditor()
  }
}
</script>
5
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
6