0.1.7 • Published 5 years ago

@truenorthtechnology/grapesjs-code-editor v0.1.7

Weekly downloads
76
License
BSD-3-Clause
Repository
github
Last release
5 years ago

GrapesJS Code Editor

A plugin to allow users to edit html and css code on GrapesJS.

Download

  • CDN
    • https://unpkg.com/@truenorthtechnology/grapesjs-code-editor
  • NPM
    • npm i @truenorthtechnology/grapesjs-code-editor
  • GIT
    • git clone https://github.com/portablemind/grapesjs-code-editor.git

Usage

<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-code-editor.min.js"></script>

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

<script type="text/javascript">
  var editor = grapesjs.init({
      container: '#gjs',
      commands: {
        defaults: [
          window['@truenorthtechnology/grapesjs-code-editor'].codeCommandFactory(),
        ],
      },
      panels: { /* ... add the open-code button to the views panel */ },
  });
</script>

Development

Clone the repository

$ git clone https://github.com/portablemind/grapesjs-code-editor.git
$ cd grapesjs-code-editor

Install dependencies

$ npm i

The plugin relies on GrapesJS via peerDependencies so you have to install it manually (without adding it to package.json)

$ npm i grapesjs --no-save

Start the dev server

$ npm start

License

BSD 3-Clause

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago