0.1.3 • Published 12 months ago

@dicarbene/vue-editorjs v0.1.3

Weekly downloads
-
License
-
Repository
github
Last release
12 months ago

Editorjs for vue3

Installation

To start using the library, install it in your project:

pnpm install @dicarbene/vue-editorjs
or
yarn add @dicarbene/vue-editorjs

Usage

For Vue 3

<!-- component.vue -->
<template>
  <EditorjsClient :data="dat" />
</template>

<script lang="ts" setup>
  import { EditorjsClient } from '@dicarbene/vue-editorjs'
  const dat = ref({})
</script>

For Nuxt 3

Define a nuxt plugin

// plugins/editorjs.client.ts
import { EditorjsClient } from '@dicarbene/vue-editorjs'

export default defineNuxtPlugin((nuxtApp) => {
  nuxtApp.vueApp.component('EditorjsClient', EditorjsClient)
})

Use EditorjsClient component anywhere in the Vue SFC

<!-- editor.vue -->
<template>
  <div>
    <ClientOnly>
      <EditorjsClient :data="dat" />
    </ClientOnly>
  </div>
</template>

<script setup lang="ts">
  const dat = ref({})
</script>

Add the build transpile.

// nuxt.config.ts
import { defineNuxtConfig } from 'nuxt/config'

export default defineNuxtConfig({
  ...
  build: {
    transpile: ['@dicarbene/vue-editorjs']
  }
})
0.1.3

12 months ago

0.1.2

12 months ago

0.1.1

1 year ago

0.1.0

1 year ago