A web component that provides an editor for a property based on its type.
bower install --save pancake-cms-property-editor
name | type | description |
---|---|---|
data | Object | The property object obtained from a component |
These are the examples for various scenarios
{
name: 'gridColumnStart',
value: 1,
type: 'text',
description: 'The start column location of this component'
};
{
name: 'randomErrorMessage',
value: 'this update statement has a logic bug how can you update the user with id 6 \n and tell the update to make the id 1, the uid is unique (primary key) for the user table and you must remove the ( uid = \'1\' ) from this statement, \nor report a bug if this is from a Contributed module',
type: 'textarea',
description: 'The statement is copied from https://www.drupal.org/node/933472'
};
{
name: 'isDialogBoxOpen',
value: true,
type: 'checkbox',
description: 'Open the dialog box by default'
};
and
{
name: 'shouldOpenLinkInNewTab',
value: false,
type: 'checkbox',
description: 'Should this link be opened in a new tab?'
};
{
name: 'subscribe',
value: 'yes',
type: 'radio',
options: [
'yes',
'no',
],
description: 'Unsubscribe option'
};
{
name: 'selectedProduct',
value: '1',
type: 'dropdown',
options: [
'Windows',
'MacBook',
'Linux'
],
description: 'Which Product should be shown by default'
};
The property-editor
triggers a property-changed
event which provides the following data in its detail
object
{
name : 'The name of the property',
value: 'The new value'
}