Size of TextArea in PropertyList

Vote:
 

Hi.

I'm wondering if it is possible to adjust the width of a UIHint.Textarea in a PropertyType editor easily (hopefully no dojo/custom editor :))

I've made a PropertyList of a custom type in a block:

[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor))]
public virtual IList TextLinesTwo { get; set; }


And in my AdditionalProductLine class I have a string property with a UIHint.Textarea:

[UIHint(UIHint.Textarea)]
public string AdditionalProductLineReadMore { get; set;  }


And it seems to work fine, however when I open the editor the text area is too large for the box and causes usability issues. I would love it if I could somehow control the width of a textarea if opening via the property editor, however I cannot seem to find a way to do it.
I tried simply creating an editor descriptor that added a width style for my specific property, but that just seemed to remove the list entirely.

( metadata.EditorConfiguration.Add("style", "width: 100px");)
#191177
Apr 23, 2018 13:29
Vote:
 

It seems using the UIHint.Longstring is giving me a much better sized TextArea in the property editor, so I'm going to use that for now.

#191178
Apr 23, 2018 14:36
Vote:
 

I always use UIHint.LongString

For future reference, you can style any element and set the width, background color, fonts etc...

http://jondjones.com/learn-episerver-cms/episerver-frontend-developers-guide/how-to-add-your-own-custom-css-in-the-episerver-editor

#191183
Apr 23, 2018 15:26
Vote:
 

Hi - thanks for the reference, however I did not want to style all the text areas, just a subset in a specific situation which was why I was trying to go the Editor Descritor route, but I would properly have to my own component for that I fear.

However, seeing as LongString seems to work fine for me at them moment, I'm going with that for now to keep it simple. :)

#191222
Apr 24, 2018 9:58