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 III
Super User III

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.

 

 

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (3,380)