Home

Awesome

GrapesJS Typed

GrapesJS Typed component made by wrapping Typed.js library

DEMO

Screenshot

Summary

Options

OptionDescriptionDefault
scriptLibrary to load asynchronously in case Typed is not foundCDN
blockObject to extend the default block <br/> eg. { label: 'Typed', ... }<br/>Pass a falsy value to avoid adding the block{}
propsCustomize component's props. The final object should be returned from the functionprops => props

Download

Usage

Directly in the browser

<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet"/>
<script src="https://unpkg.com/grapesjs"></script>
<script src="path/to/grapesjs-typed.min.js"></script>

<div id="gjs"></div>

<script type="text/javascript">
  const editor = grapesjs.init({
      container: '#gjs',
      // ...
      plugins: ['grapesjs-typed'],
      pluginsOpts: {
        'grapesjs-typed': { /* options */ }
      }
  });
</script>

Modern javascript

import grapesjs from 'grapesjs';
import plugin from 'grapesjs-typed';
import 'grapesjs/dist/css/grapes.min.css';

const editor = grapesjs.init({
  container : '#gjs',
  // ...
  plugins: [plugin],
  pluginsOpts: {
    [plugin]: { /* options */ }
  }
  // or
  plugins: [
    editor => plugin(editor, { /* options */ }),
  ],
});

Development

Clone the repository

$ git clone https://github.com/artf/grapesjs-typed.git
$ cd grapesjs-typed

Install dependencies

$ npm i

Start the dev server

$ npm start

Build the source

$ npm run build

License

MIT