cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sam4
Resolver I
Resolver I

HTML element - auto-resize a <text area> from a Multiline column in SharePoint

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 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

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.

 

 

View solution in original post

3 REPLIES 3
timl
Super User
Super User

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"?

 

image.png

 

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. 

 

Screenshots.JPG

 

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.

 

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,242)