Skip to content

Instantly share code, notes, and snippets.

@mattbrailsford
Last active December 19, 2019 13:31
Show Gist options
  • Save mattbrailsford/6f4239f1019c99d7de77b0470119bff4 to your computer and use it in GitHub Desktop.
Save mattbrailsford/6f4239f1019c99d7de77b0470119bff4 to your computer and use it in GitHub Desktop.
angular.module('umbraco').factory('MyPropEditorClipboardActionHandler', function clipboardFactory() {
return {
handle: function () {
// Do something
}
}
});
{
// I'm a prop editor developer so I'll define my actions inline
"propertyEditors": [
{
"alias": "MyPropEditor",
"name": "MyPropEditor",
"editor": {
"view": "~/app_plugins/MyPropEditor/views/propertyeditors/MyPropEditor.html",
"hideLabel": false,
"valueType": "STRING"
},
"actions": [
{
"labelKey": "clipboard_labelForRemoveAllEntries",
"labelTokens": [],
"icon": 'trash',
"handler": "MyPropEditorClipboardActionHandler"
}
]
}
],
// I'm a developer who wants to extend an existing prop editor so I'll define my actions here
"propertyActions": [
{
"propertyEditor": "MyPropEditor",
"labelKey": "clipboard_labelForRemoveAllEntries",
"labelTokens": [],
"icon": 'trash',
"handler": "MyPropEditorClipboardActionHandler"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment