Button type error #5609
Replies: 1 comment
-
In GrapesJS, the StyleManager is designed to handle styling properties for components, not to execute commands or functions. However, if you want to add a button within a sector of the StyleManager that performs an action when clicked, you would typically need to create a custom property type that acts as a button.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Type Button doesn't work.
How make or create type button in StyleManager ?
editor.StyleManager.addSector('editor', {
name: 'EDITOR',
open: false,
properties: [{
type: 'button',
// ...
text: 'Click me',
full: true, // Full width button
command: editor => alert('Hello')
// or you can just specify the Command ID
}]
})
Beta Was this translation helpful? Give feedback.
All reactions