How to do "Inline" editing including custom contro...
# help-with-umbraco
l
We really need the "content template" feature of Contentment's content blocks, and that's such a big win that the built-in block-list loses. However, having inline editing instead of "infinite" dialogs weighs at least 49% as well. šŸ˜„ 1. Anyone know if it's possible -; and if so how to replace one of the four built-in "display modes" with an inline one? 2. It would also be super nice to be able to look up names from uuids so they can be shown as the block names. I imagine that'd be farly simple if we could use a custom view w/a controller and wrap the contentment/umbraco ones.
l
On the docs for Contentment's Content Blocks, just found that I've got a TODO note šŸ¤¦ā€ā™‚ļø https://github.com/leekelleher/umbraco-contentment/blob/develop/docs/editors/content-blocks.md The idea is that you can implement your own display mode from the [
IContentBlocksDisplayMode
](https://github.com/leekelleher/umbraco-contentment/blob/develop/src/Umbraco.Community.Contentment/DataEditors/ContentBlocks/IContentBlocksDisplayMode.cs) interface. But this isn't at block/item level, it's the entire property editor (all blocks). From then there are lots of moving parts, so not really a trivial undertaking. Feel free to leverage whatever Contentment can offer, in terms of markup and JS. e.g. https://github.com/leekelleher/umbraco-contentment/blob/develop/src/Umbraco.Community.Contentment/DataEditors/ContentBlocks/content-blocks.html https://github.com/leekelleher/umbraco-contentment/blob/develop/src/Umbraco.Community.Contentment/DataEditors/_/_components.js#L47 https://github.com/leekelleher/umbraco-contentment/blob/develop/src/Umbraco.Community.Contentment/Web/UI/App_Plugins/Contentment/components/blocks-editor.html I have been toying with an idea of having a "templated label" display mode, e.g. using custom AngularJS template, then that could open the door to making an inline display mode too. But I dunno, these days I can't seem to find the time. 😬
l
Thanks a lot for the thorough reply. We might just find some time since we want our cake and eat it too. Are the `IContentBlocksDisplayMode`s auto-discovered and actually used, or is that planned?
l
they are auto discovered
l
Awesome! Door just got a lot bigger. šŸ˜„
the config options are mostly for if they support the Content Templates, copy feature or previews, etc.
l
yep! on my way to the umbraco source now to see if I can spot a component to use.
or maybe even just
<umb-element-editor-content model="block.content"></umb-element-editor-content>
We gave up. šŸ˜… I hadn't realized how different they were and all the "features" to extract from the dialog. Will possibly look into snagging the content template work instead. šŸ™ˆ
But awesome that display modes can be added.