cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

auto align 2 componets, it is possible?

Hi all:

 

I have a HTML control that in some point I need to scrool down, I also have an image in front of that HTML control for reference, so my question is: 

 

Does I have an option for auto aling this 2 compenents, I mean when I scrool down my HTML the image move down or up togeter with it? I show you this GIF for you reference how its actually is working, as you see naturally the image dont move from its position

 

prueba.gif

 

Please note that embed the image on the HTML is not an option for me since this change on every sesion.

17 REPLIES 17

From my tests, it's working with the 'Rich text editor' control but not the 'HTML text' control.

Community Support
Community Support

Hi @felipito1 ,

Could you please share a bit more about your scenario?

Do you want the Image to move down or up together when you scroll up or down the scrollbar in Html Text control?

 

Based on the needs that you mentioned, I afraid that there is no direct way to achieve your needs. Yes, you are right. It is an known issue with Html Text control in PowerApps -- we could not display base64 image data directly within Html Text control, instead, we could only display image data within Html Text using Image URL.

Please check the following thread for more details:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Picture-in-HTML-Text/td-p/153297

 

As an alternative solution, you could consider save the uploaded image file into your OneDrive folder with the help of Power Automate, then create a Shared Url Link for this created file. Then add a "Respond to PowerApps or flow" action to return the generated Shared URL Link back to your app. Then you could use the Shared URL Link within the <img> tag in your Html Text control.

 

I have made a test on my side, please consider take a try with the following workarpound:

Flow's configuration as below:

1.JPG

 

App's configuration as below:

2.JPG

 

3.JPG

Set the OnChange property of the AddMediaButton1 control to following:

 

Set(
    SharedLink,
     'YourFlowName'.Run(
                          Substitute(JSON(UploadedImage1.Image, JSONFormat.IncludeBinaryData), """", "")
                       ).sharedlink
)

 

 Set the Html Text property of the HtmlText control to following:

 

"The image as below: <br><img src='" & SharedLink & "' width='500' height='450'></img>"

 

 

Please consider take a try with above solution, check if the issue is solved.

 

More details about firing a flow from a PowerApps app, please check the following video resource:

https://www.youtube.com/watch?v=1wl9AtxWdkg

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

I will try it on that editor... query: How do you tell to this editor what is HTML CODE and what is normal text?

The default text is

"Enter some <strong>rich text</strong> here."

You don't have to specify if it's regular text or HTML. You can just inject HTML into any point in that, such as

"Enter some <strong>rich text</strong> here.<br>Page break test"

---
If this answered your question, please click "Accept Solution". If this helped, please Thumbs Up. 

sorry I will try formulate my question again, how you put the base64 image on the rich editor?

Set(imageData,JSON(UploadedImage1.Image,JSONFormat.IncludeBinaryData))

Then, add this to your HTML:

<div>
  <img src=" & imageData & "/>
</div>

Thank you this work perfectly!!!

 

@v-xida-msft 

Hi Again.

 

After a time creating my app, I have realized that when I use that flow for embeddeda image to a HTML control the one I finally email to other person with the image embedded this image dessapear after 1 hour. its look like the created shared links automatically expired after 1 hour. because when I click on the image I have the next message 

 

Sorry, something went wrong
 
 
The access token has expired. It's valid from '4/16/2020 2:44:37 AM' and to '4/16/2020 3:44:37 AM'.
 
 
 
do you sugget sothing?
 
Thank you!!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,438)