Allow passing editorData (aka dialogData) to editorService.open
See original GitHub issueThe v8 editorService is a great replacement for dialogService, built from scratch to be used all over the backoffice and allowing infinite editing.
There is one feature, though, that seems to have been lost in the trade: the option to pass custom data (formerly ‘dialogData’) to the overlay controller.
Unless there is a way to do this (I didn’t found it) and if you find this feature useful I can gladly submit a PR - it only requires adding one line in umbraco.controller.js:
Before:
// event for infinite editors
evts.push(eventsService.on('appState.editors.open', function (name, args) {
$scope.infiniteMode = args && args.editors.length > 0 ? true : false;
}));
After:
// event for infinite editors
evts.push(eventsService.on('appState.editors.open', function (name, args) {
$scope.infiniteMode = args && args.editors.length > 0 ? true : false;
$scope.editorData = args && args.editor ? args.editor.editorData: null;
}));
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@JoseMarcenaro the entire object you pass along to the
editorService.open
method is accessible through the controller via$scope.model
.Eg. with
you’ll be able to call
$scope.model.example.test
to get my example boolean value.Isn’t this what you’re looking for, or are you describing something else?
Glad you raised this issue…i was wondering the exact same thing about dialogData.