Hi, I've a HTML element displaying the data from a SharePoint column in SharePoint which format is "Multiline". The code is something like this:
<span style=""width:100%; padding-top:5px;"">
<textarea readonly style=""width: 100%; height: 200px; overflow-y: scroll; font-family:open sans; margin-top: 10px; border: 1px solid;"">
"&MySP_List.MyMultilineColumn&"
</textarea>
</span>
I was thinking I could change the height property to "height:auto", but it is doing nothing.
At the moment this value is set to 200px but the multiline column can be any size and I would like that to resize automatically to the max length of the box.
Is there any option to do that?
I think I could do that with Javascript but as far as I know JavaScript is not possible in the HTML component?
Any idea or suggestion to display in a HTML component a multiline column with auto resize is more than welcome.
Kind REgards
Solved! Go to Solution.
Just for the record, I was not able to solve the problem using <textarea> tag. Instead of that I used <div> with some CSS to simulate the look and feel and using that, it worked for me.
Hi @Sam4
Have you tried setting the 'Auto height' property, or is that what you were trying to do when you set the height property to "height:auto"?
Hi @timl thanks for your reply,
I'm not referring to the whole HTML but to a specific text box in the HTML.
So if the HTML is presenting these 3 text boxes, that are data in SharePoint (Text the first 2, and multiline the last one), the last one is not resized to display the total text.
So the whole HTML is resized with that property as you mention, but the text box displaying a multiline column within the HTML, it is not.
Just for the record, I was not able to solve the problem using <textarea> tag. Instead of that I used <div> with some CSS to simulate the look and feel and using that, it worked for me.