File Manager

Current Path : /webspace/www.cordales.be/html/wp-content/plugins/nextgen-gallery/static/IGW/Block/src/
Upload File :
Current File : /webspace/www.cordales.be/html/wp-content/plugins/nextgen-gallery/static/IGW/Block/src/block.jsx

import NGGEditor from './edit.jsx'
import icons     from './icons.min';
import React     from 'react';

const { __ } 				= wp.i18n
const { RawHTML } 	        = wp.element
const { registerBlockType } = wp.blocks

// Register our block
registerBlockType('imagely/nextgen-gallery', {

    title: __('NextGEN Gallery'),

    description: __('A block for adding NextGEN Galleries.'),

    icon: icons.nextgen,

    category: 'common',

    attributes: {
        content: {
            type: 'string',
            source: 'html',
        },
    },

    supports: {
        className: false,
        customClassName: false,
    },

    edit({attributes, setAttributes}) {
        return <NGGEditor content={attributes.content}
                          onInsertGallery={(shortcode) => {
                              setAttributes({content: shortcode});
                          }}/>
    },

    save({ attributes }) {
        return attributes.content;
    }
});

File Manager Version 1.0, Coded By Lucas
Email: hehe@yahoo.com