nk-crew / lazy-blocks-custom-control-template Goto Github PK
View Code? Open in Web Editor NEWLazy Blocks Custom Control Template
Lazy Blocks Custom Control Template
When following the instructions on https://lazyblocks.com/documentation/examples/create-custom-control/ and running the build, the following error pops up:
Syntax error: unexpected token in jsx file
I had to update the babel-loader config like this:
{
test: /(\.jsx|\.js)$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['@babel/react'],
}
}
and use new babel versions
"@babel/core": "7.11.6",
"@babel/cli": "7.11.6",
"@babel/preset-react": "7.10.4",
"babel-loader": "8.1.0",
To make the build work
In the base plugin I've noticed that a new method has been added for controls called filter_control_value that can be used to transform output of that control to streamline and replace some of the existing output transformation filters. I'm noticing that when I declare this in the custom control in the same way it's declared in the control classes in the base plugin, it doesn't seem to be running this function. I also tried to add_filter for filter_control_value in the __construct method of the custom control similar to how it is in _base and also did not observe the function influencing the output. Can custom controls use filter_control_value?
The file script under assets/js/CONTROL-NAME.min.js
is minified and i do not understand what is for.
Does it should be always added? Is it required?
I notice inside the vars
CONTROL_NAME_custom_attribute
CONTROL_NAME
and the text class NAMESPACE-lzb-control_CONTROL_NAME
.
So i presume that those names should be replaced, like into the css file assets/css/CONTROL-NAME.min.css
.
Can you please include the non-minified version of those files also, please?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.