November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Here is the definition of a textarea property we wanted to enable editing on the page:
[Display(
GroupName = SystemTabNames.Content,
Name = "Sold-Out Communities List",
Order = 60)]
[UIHint(UIHint.Textarea)]
public virtual string SoldOutCommunities { get; set; }
The controller takes this input and reformats it to be displayed to the user, so its not just plain text spit back out onto the page. Due to this, I have to force a refresh for the user to see their changes using this method:
@Html.FullRefreshPropertiesMetaData(new [] { "SoldOutCommunities" })
To enable on-page editing we applied the @Html.EditAttributes to the container element so it would show the editor. We added data-epi-property-edittype="floating" so that is shows as a popup rather than inline. The side effect is that the page refreshes every character to type. Its totally unusable. It makes me wish there were client side attributes to control when the page refreshes based on the change of a property.
Did you ever manage to find a solution to this problem? We have this issue for UIHint.Textarea properties that the page gets refreshed on every keypress. This causes sometimes data not to be posted correctly.
I was typing out a long answer on this, but then I decided to just throw together an article about an approach I have used along with code samples.
The approach I took is to create an EditorDescriptor and a very simple custom Dojo Dijit to use the same method the PreviewableText UIHint does, but with a TextArea.
Check it out here: https://beendaved.blogspot.com/2021/04/previewable-textarea-properties.html
Let me know if this helps, or if you have any questions.
I have an issue where I have a string property with UIHint.Textarea added to it so that I can put multiline text into the field. The controller/view takes what is entered into that field and does some server side tranformation of it and spits out a structure the view uses to populate the page. So in order for me to enable on-page editing I have added the edit attributes so that it shows a popup of the textarea editor for it, but I need a full-page refresh before the results of editing that field can be shown. Inline replacement of the markup wont work in this case due to the server side code that transforms it. So I added the field to the FullRefreshPropertiesMetaData method call, but this refresh is triggered on every key stroke, rather than when the edit dialog is closed. Does anyone know a way to delay the refresh until the dialog is closed, or maybe some other methodology of on page editing that would work in this case? It feels like my only option is to exclude this field from on page editing.