Skip to content

Instantly share code, notes, and snippets.

@yooouuri
Last active November 9, 2024 12:40
Show Gist options
  • Save yooouuri/d158fcd4d2f4e1ef99996b05eef645d2 to your computer and use it in GitHub Desktop.
Save yooouuri/d158fcd4d2f4e1ef99996b05eef645d2 to your computer and use it in GitHub Desktop.

Install the editorjs package:

yarn add @editorjs/editorjs

or

npm i @editorjs/editorjs --save

The next step is to import the package.

import EditorJS from '@editorjs/editorjs'

In Vue

<script setup lang="ts">
import EditorJS from '@editorjs/editorjs'
import { onMounted } from 'vue'

onMounted(() => {
  const editor = new EditorJS({
    /**
     * Id of Element that should contain Editor instance
     */
    holder: 'editorjs'
  });
})
</script>

<template>
  <div id="editorjs"></div>
</temaplte>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment