function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arvind010Arvind010 

How to display a text file from static resources in a textarea?

I need to display text in a Textarea.Is it possible to save the text document in a static resource and call that using ($Resource.Resourcename) in <apex:inputTextarea> tag?

Please provide me the solution.
ESES
Input elements are supposed to be bound to properties in controllers/extensions (changes made by user are posted back to the controller when an action is invoked). I can understand if you want to bind output elements (e.g. outputText) to a text stored in static resources, but I don't think binding elements like inputTextArea to static content makes any sense.
Arvind010Arvind010
How to use it for output elements?
ESES
You can load it into an iframe.
Code:
<apex:iframe src="{!$Resource.YourTextFile}"/>