VisualComposer / vcwb-demo-element-example-plugin

Demo elements Wordpress plugin example for VCWB using elements API
GNU General Public License v3.0
31 stars 10 forks source link

Demo plugin with custom elements for Visual Composer Website Builder

This is a Demo (example) plugin for developers to showcase custom elements. It acts as a sandbox for developers. To see it in action download and install it on your WordPress instance along with the Visual Composer Website Builder plugin.

Requirements

Installation

Element update

What is an element?

An element is the independent part of the system which represents HTML based block with the ability to output media and dynamic content.

How does it work?

The editor works with elements as React components. These components must be built with webpack and enqueued by API. Every element has a preview image, thumbnail image, category and React-based component.

Element content

Each element contains

Directory {tag} (must be renamed to the element tag name):

Commands

yarn install // Install all the element dependencies
yarn build // Builds development build
yarn watch // Watches & Builds development version on file modification
yarn build-production // Builds the minified build

lessc elementName/public/src/init.less elementName/styles.css // compile LESS source file to CSS output
../../node_modules/.bin/webpack --config=webpack.config.js -p // minify JS file for public use inside elementName/public folder

Resources for Visual Composer API: