with that tutorial it wasn´t really hard to add a new editor, but I cannot find a way to add properties to it (right panel) like a content picker or a custom editor also there is no setting button by default.
I have found solutions to open a config panel with javascript, is it actually the only one solution?
P.S. have found LeBlender but wanna understand it and do it on my own ;-)
As far as I know, you have to do the config yourself.
I'd start by having a look at the dialogService available in Umbraco. It's fairly well documented over here.
Just pop a dialog with your own view and controller that returns values to your grid property controller.
Here's a quick sample from the doc:
var dialog = dialogService.open({template: 'path/to/page.html', show:true, callback: done});
functon done(data){
//The dialog has been submitted
//data contains whatever the dialog has selected / attached
}
Yup, if you want to add properties/settings to a custom editor using the right pane, the dialog service is the way to go.
A thing to consider is that the settings button you are referring to is actually used for cell settings and styles (configured on the grid datatype) and not for settings on the editor it self. Ie. to configure cell background-color, class and so forth.
If you take the media editor for example, you click on the editor itself to open the right pane and add an image from there.
Custom grid editor with properties
Hello umbraco community,
I have an understanding problem to create a custom grid with properties, how it works? :D Ok, i have read this tutorial to create custom grid editor
https://our.umbraco.org/documentation/getting-started/backoffice/property-editors/built-in-property-editors/grid-layout/build-your-own-editor
with that tutorial it wasn´t really hard to add a new editor, but I cannot find a way to add properties to it (right panel) like a content picker or a custom editor also there is no setting button by default.
I have found solutions to open a config panel with javascript, is it actually the only one solution?
P.S. have found LeBlender but wanna understand it and do it on my own ;-)
As far as I know, you have to do the config yourself.
I'd start by having a look at the dialogService available in Umbraco. It's fairly well documented over here.
Just pop a dialog with your own view and controller that returns values to your grid property controller.
Here's a quick sample from the doc:
thanks, good to know that there is actually no configuration for it. I´ll try it with dialogService, thanks for help
Yup, if you want to add properties/settings to a custom editor using the right pane, the dialog service is the way to go.
A thing to consider is that the settings button you are referring to is actually used for cell settings and styles (configured on the grid datatype) and not for settings on the editor it self. Ie. to configure cell background-color, class and so forth.
If you take the media editor for example, you click on the editor itself to open the right pane and add an image from there.
All the best Rune
is working on a reply...