I'm currently working on a custom table box for wordpress. I already have a custom made plugin and some javascript code, but it's mostly copied and I cant figure out how to convert it into a table (when I use the plugin, I can only add in plain text and it has a coloured box around it). It would be really nice if someone could figure it out for me.
heres some code
function updateContent(event) {
props.setAttributes({content: event.target.value})
}
function updateColor(value) {
props.setAttributes({color: value.hex})
}
return React.createElement(
"div",
null,
React.createElement(
"h3",
null,
"Simple Box"
),
React.createElement("input", { type: "text", value: props.attributes.content, onChange: updateContent }),
React.createElement(wp.components.ColorPicker, { color: props.attributes.color, onChangeComplete: updateColor })
);
Thats basically where all the magic happens (dont know why its cropped so weird)