AI OnAI Off
Hi Ron,
First of all, I have to say that having blocks inside XhtmlString properties is one of the best features ever! Our editors love it! :)
One way to disable this is to create a custom EditorDescriptor:
[EditorDescriptorRegistration( TargetType = typeof(XhtmlString), EditorDescriptorBehavior = EditorDescriptorBehavior.ExtendBase, UIHint = "MyDescriptor")] public class MyDescriptor : EditorDescriptor { public MyDescriptor() { AllowedTypes = new[] { typeof(PageData) }; } }
And decorate your XhtmlString properties like this:
[UIHint("MyDescriptor")] public virtual XhtmlString MyProperty { get; set; }
I'm not sure if blocks inside XhtmlString are officially supported. AllowedTypes attribute used to work with XhtmlString properties, but not anymore.
I've tested the code above with Alloy, EPiServer CMS 9.6.1, and latest version of Google Chrome
Hope this helps!
Episerver has the feature to drag blocks in XHTML fields, it automatically creates dynamic content in this property. I want to disable this feature because it creates confusion with users and also can mess up the layout of the page.
How can i disable this feature?
Thanks in advance