ru-se.com

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

materialis.js (793B)


      1 var registerBlockType = wp.blocks.registerBlockType,
      2     blockStyle = {};
      3 
      4 registerBlockType( 'extendstudio/materialis', {
      5     title: 'Materialis Block',
      6 
      7     icon: 'html',
      8 
      9     category: 'layout',
     10 
     11     supports: {
     12 		 customClassName: false,
     13 		 className: false,
     14          html: false,
     15          inserter: false,
     16          reusable: false,
     17     },
     18     
     19     attributes: {
     20 		content: {
     21 			type: 'string',
     22 			source: 'html',
     23 		},
     24 	},
     25     
     26     edit: function(props) {
     27         var content = props.attributes.content;
     28         return wp.element.createElement(wp.element.RawHTML, null, content);;
     29     },
     30 
     31     save: function( props  ) {
     32         var content = props.attributes.content;
     33         return wp.element.createElement(wp.element.RawHTML, null, content);
     34     },
     35 } );