Try our conversational search powered by Generative AI!

[AllowedTypes] of Xhtml field

Vote:
 

We added the AllowedTypes attribute to an Xhtml field to limit the different kind of block that are allowed in the mainbody area.

[AllowedTypes(new[] { typeof(LinkBlock), typeof(TextBlock) })]
public virtual XhtmlString MainBody { get; set; }

After that we experienced all kinds of weird behavior. We were not longer able to 'drag n drop' in blocks (not even the allowed types) to the mainbody area. Sometimes the mainbody area was emptied when trying.

Anyone experienced the same thing? Is the AllowedType attribute compatible with XhtmlString?

#112498
Oct 29, 2014 10:15
Vote:
 

Not working here either, seems that it's not supported.

#114981
Jan 07, 2015 9:18
Vote:
 

For me it works fine in IE, but it doesn't work so well in Google Chrome.
For example, when using Google Chrome, I have to click on XHTML field first, and only then drag&drop the block.
I don't have to do that in IE.

I also noticed that sometimes drag&drop validation is not triggered, so I have to use custom IValidate<PageData> validator.

#116600
Feb 03, 2015 12:10
Vote:
 

Yes, misread the question :)
Content doesn't disappear, just the blue border around all input fields in Chrome and FF.

EPiServer 7.19.1

#116632
Feb 03, 2015 13:13
Vote:
 

There is a discussion about this in the following Blog post: http://world.episerver.com/blogs/Ben-McKernan/Dates/2015/2/the-new-and-improved-allowed-types/

#116762
Feb 04, 2015 14:53
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.