1.0.1 • Published 4 years ago

vue-grapesjs-component v1.0.1

Weekly downloads
8
License
-
Repository
-
Last release
4 years ago

vue-grapesjs-component

NPM package NPM downloads

Use grapesjs like vue component.

Install

npm install --save vue-grapesjs-component
or
yarn add vue-grapesjs-component

Usage

Plugin install:

import Vue from 'vue'
import VueGrapesjsComponent from 'vue-grapesjs-component';

Vue.use(VueGrapesjsComponent)

and then:

<vue-grapesjs-component>
  <h1>Hello</h1>
</vue-grapesjs-component>

In your layout html add grapesjs library:

<html>
  <head>
    <script src="https://unpkg.com/grapesjs"></script>
    <link rel="stylesheet" href="https://unpkg.com/grapesjs/dist/css/grapes.min.css">
  </head>
</html>

Props

nametypedefaultdescription
configObject-Go to grapesjs documentation in initialize section for more details

Events

namedescription$event
loadFires when editor is initializededitor
updateFires when the structure of the template is updated{ components: Array, styles: Array }

Slots

namedescription
defaultTemplate content

License

MIT