[Resolved] Umbraco 13 - Block List Custom View bre...
# help-with-umbraco
r
See theres a breaking change in 13 when using RTE's with Custom Views (in the back office) https://github.com/umbraco/Umbraco-CMS/pull/15029 However it doesn't show an example of how to show the data. The raw data from the RTE now comes back as: {"markup":"Text from the RTE","blocks":{"layout":null,"contentData":[],"settingsData":[]}}` Can someone please let me know what I need to change this code from to show the value from the RTE in the new format? {{block.data.richText}}` Thanks 🙂 The documentation for Block Custom Views seems to me missing for 13 https://github.com/umbraco/UmbracoDocs/blob/main/13/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/rich-text-editor/build-custom-view-for-blocks.md
s
Have you tried
<div>{{block.data.richText.markup}}</div>
? Might work, if not, could you please post your question on the PR you linked?
r
hey Sebastian, This works thank you 🙂 I'll make a note on the pull request, as someone asked the same question a few weeks back
m
You might want to use the
safe_html
filter, otherwise it strips your style attributes or anything angularJs 1 thinks might be unsafe.. https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Web.UI.Client/src/common/filters/safehtml.filter.js
Copy code
<div ng-bind-html="block.data.richText.markup | safe_html"></div>
PS There is a demo rte in the source code... https://github.com/umbraco/Umbraco-CMS/blob/contrib/src/Umbraco.Cms.StaticAssets/wwwroot/App_Plugins/Umbraco.BlockGridEditor.DefaultCustomViews/umbBlockGridDemoRichTextBlock.html
294 Views