4.1.1 • Published 2 months ago

@kitconcept/volto-separator-block v4.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

Volto Separator Block

NPM Build Status Build Status Build Status

kitconcept GmbH

The Volto Separator Block allows editors to add a visual separator between blocks to a Volto page.

Screenshot

Separator-Block

Screencast

Separator-Block

Installation

Create a new Volto project (you can skip this step if you already have one):

npm install -g yo @plone/generator-volto
yo @plone/volto my-volto-project --addon @kitconcept/volto-separator-block
cd my-volto-project

Add @kitconcept/volto-separator-blockto your package.json:

"addons": [
    "@kitconcept/volto-separator-block"
],

"dependencies": {
    "@kitconcept/volto-separator-block": "*"
}

Download and install the new add-on by running:

yarn install

Start Volto with:

yarn start

Go to http://localhost:3000, login, create a new page. The separator block will show up in the Volto blocks chooser.

Block Alignment Enhancer

This block features by default a block schemaEnhancer that provides an alignment option for the separator. This can be disabled by overwriting with your own schemaEnhancer

  config.blocks.blocksConfig.separator = {
    ...config.blocks.blocksConfig.separator,
    schemaEnhancer: mySeparatorSchemaEnhancer,
  }

or setting it to null or undefined:

  config.blocks.blocksConfig.separator = {
    ...config.blocks.blocksConfig.separator,
    schemaEnhancer: null,
  }

Also, if you want to keep the default alignment but still add your own schemaEnhancer you can compose it along with your own:

import { composeSchema } from '@plone/volto/helpers';
import { SeparatorStyleEnhancer } from '@kitconcept/volto-separator-block';

    config.blocks.blocksConfig.separator = {
      ...config.blocks.blocksConfig.separator,
      schemaEnhancer: composeSchema(mySeparatorSchemaEnhancer, defaultSeparatorEnhancer),
    }

Credits

The development of this plugin has been kindly sponsored by Forschungszentrum Jülich.

License

The project is licensed under the MIT license.

4.1.1

2 months ago

4.1.0

4 months ago

3.2.2

11 months ago

3.2.1

11 months ago

4.0.0

10 months ago

3.2.0

11 months ago

3.1.0

12 months ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.0.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

1.0.0-alpha.0

2 years ago