Hide

YetaWF Documentation

Display
Print

TextArea Component

TextArea (Display)

Displays the model as a string or as a read/only CKEditor. If a MultiString is provided, only the text in the user's defined language is shown (see User > Settings, standard YetaWF site).

Model Type: object

AdditionalMetadata Attributes

NameTypeDefaultDescription
SourceOnlyboolfalseDefines whether the text area is rendered using a read/only CKEditor in source mode only. Otherwise, the model is rendered as a string.
FullboolfalseDefines whether the text area is rendered using a read/only CKEditor, otherwise the model is rendered as a string.
EmHeightint10Defines whether the text area is rendered using a read/only CKEditor in source mode only. Otherwise, the model is rendered as a string.
SourceOnlyboolfalseDefines the approximate height of the CKEditor in line heights based on the page font. The defined height can only be approximated and is by no means meant to be exact. This setting is ignored if the model is rendered as a string.
EncodebooltrueDefines whether "\r\n" and "\r" are preserved as new lines using <br/> and the model is encoded when rendered as a string. Otherwise the string is not encoded. This is ignored if a read/only CKEditor is used to render the model.
[Caption("Message"), Description("The feedback message")]
[UIHint("TextArea"), ReadOnly]
[AdditionalMetadata("SourceOnly", true)]

TextArea (Edit)

Allows entry of a formatted HTML encoded string and returns the entered text as an HTML encoded string. If a MultiString is provided, only the text in the user's defined language can be modified (see User > Settings, standard YetaWF site).

Model Type: object

If the StringLengthAttribute is specified for the model, the TextArea box is limited to the specified number of characters.

To render a regular TextArea HTML tag (without CKEditor), use the TextAreaSimple Component instead.

AdditionalMetadata Attributes

NameTypeDefaultDescription
SourceOnlyboolfalseDefines whether the text area is rendered using a CKEditor in source mode only. Otherwise, the full CKEditor feature set is available to create HTML formatted text.
TextAreaSaveboolfalseDefines whether the CKEditor toolbar offers a Save button. Otherwise, the Save button is not shown. This is not currently working (apologies).
ImageBrowseboolfalseDefines whether image support is available to browse, upload and save images. Otherwise, image support is not available.
PageBrowseboolfalseDefines whether page selection support is available when adding links. Otherwise, page selection support is not available.
RestrictedHtmlboolfalseDefines whether only an HTML subset is available when creating text. Otherwise, all HTML formatting is available. Restricting HTML tags does not work well with YetaWF and should not be used.
EmHeightint10Defines whether the text area is rendered using a read/only CKEditor in source mode only. Otherwise, the model is rendered as a string.

Sibling Properties

NameTypeDescription
model__FolderstringUsed for image support to identify the module owning the images. If this property is not found, the current module is used as the image file owner.
model__SubFolderstringUsed for image support to identify the module owning the images. If this property is not found, the current module is used as the image file owner.
[Caption("Comment"), Description("Enter your comment about this blog entry for others to view")]
 [UIHint("TextArea"), AdditionalMetadata("EmHeight", 10), StringLength(BlogComment.MaxComment)]
 [AdditionalMetadata("TextAreaSave", false), AdditionalMetadata("RestrictedHtml", true)]
 public string Comment { get; set; }