ContentPart property with rich edit support

Topics: Writing modules
Oct 2, 2012 at 1:57 AM

I have a content type with a description property. When creating a new instance of the content type (EditorTemplate) I would like this property to have a rich text input experience. I read on another post to use something like this: @Display.Body_Editor(Text: Model.Description, EditorFlavor: "html")

This does render TinyMCS, exactly like I wanted, but the property appears to not be updated when I press the save button (Field is required so I get a validation error). Looking at the html the id and name of the tag generated is set to “Text”, assuming this is not correct, but not sure how to make it do anything else.

Very new to Orchard, appreciate any assistance!


Oct 2, 2012 at 2:15 AM

You mean a content part? If so, look at the driver for the body part.

Oct 2, 2012 at 3:08 PM

Thanks for the assist, I was looking at the body part originally, but confused by the fact that TinyMCE overloads the default html editor view for the body content. Once I figured that out everything clicked and I have been able to get my component working as intended.

Thanks again,