Using editorService equivalent in Umbraco 14+?
# help-with-umbraco
a
Hi all, We've developed a nice plugin for Umbraco 11+, which lets CMS users edit website pages from Umbraco. Works very intuitive. In short, workflow is as follows: 1) User clicks a page-node in the content tree 2) Clicks the 'Open visual editor' button in the property editor (plugin) on the right 3) This click opens up a modal with an iframe, rendering the corresponding url in preview mode 4) UI elements are added to add/edit content 5) When clicking an element, an event is bubbled back to the iframe opener 6) We call the injected AngularJS editorService to open a sidebar with an infinite content editor, so the user can edit the node it clicked 7) After save/publish, the iframe is refreshed and changes are visible I'm willing to upgrade to Umbraco 14+ and doing some research on how to migrate this plugin. Unfortunately, it looks like I'm going to write lots of additional scripts to achieve a similar experience. Despite that, our plugin depends heavily on the AngularJS editorService. Can someone write me a very basic example on how to open a 'edit node' in a sidebar? Or is that not supported (yet)? Thank you!
s
editorService is modals in the new backoffice. Not sure how much is documented though https://docs.umbraco.com/umbraco-cms/customizing/extending-overview/extension-types/workspaces/modals
a
Yes, I noticed. With that example it seems one can build a custom modal. What I'd like to do, is open a built-in modal which lets me edit a node, without writing my own code as 'editing a node in a sidebar' is a built in Umbraco function. That's what editorService made possible: call a 'native' Umbraco function from my own plugin.
s
You can do the same with modals, you just need the right modal context IIRC. If you can't find it in the docs, maybe you can look in the source code for things working similarly, eg. the content picker, that also can open the selected node for editing.
a
That would be great. Will look further into it when we're going to upgrade to 14+. Too busy for now. 🙂 Hope the docs will be more complete in the future.
2 Views