From 73df2d3a75688f55585205f449268c47a0701804 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Mon, 29 Aug 2022 16:46:24 +0200 Subject: [PATCH] Update README --- README.md | 45 ++++++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 90eb1a3..31880dc 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,6 @@ Simple countdown component for GrapesJS Editor * Blocks: `countdown` -* Switched the plugin name from `gjs-component-countdown` to `grapesjs-component-countdown` -* Added `id` -* Removed `blocks` and `labelCountdownCategory` options in favor of `block`. -* Removed `defaultStyle` options in favor of `style`. -* Removed `labelCountdown` options in favor of `label`. -* Removed `countdownClsPfx` options in favor of `classPrefix`. - - ## Options | Option | Description | Default | @@ -51,7 +43,13 @@ Simple countdown component for GrapesJS Editor ## Download -* `npm i grapesjs-component-countdown` or `yarn add grapesjs-component-countdown` +* CDN + * `https://unpkg.com/grapesjs-component-countdown` +* NPM + * `npm i grapesjs-component-countdown` +* GIT + * `git clone https://github.com/artf/grapesjs-component-countdown.git` + @@ -59,9 +57,10 @@ Simple countdown component for GrapesJS Editor ## Usage +Directly in the browser ```html - - + +
@@ -69,14 +68,34 @@ Simple countdown component for GrapesJS Editor ``` +Modern javascript +```js +import grapesjs from 'grapesjs'; +import pluginCountdown from 'grapesjs-component-countdown'; + +const editor = grapesjs.init({ + container : '#gjs', + // ... + plugins: [pluginCountdown], + pluginsOpts: { + [pluginCountdown]: { /* options */ } + } + // or + plugins: [ + editor => pluginCountdown(editor, { /* options */ }), + ], +}); +``` +