htmlView content selectable

Hello everyone

Please, how can I make the content of a htmlView control selectable, for user to copy content and paste elsewhere?

Thanks

Where does the content come from?

The app generates a product description in html code, with information from a database and an image from a web server. I’d like to allow user to copy it.

The text or the image?

Does the image come from another website? If so, you will run into Same-Origin issues.

I’d like to make them both selectable, like a default web page.

Thanks for the SOP topic, having no trouble so far. I’m using Ajax/php and retrieving the image from a database.

It sounds like you’re getting the image the right away to avoid SOP. Check the Chrome Debugger to be certain.

Are you having trouble selecting the text, the image or both?

Having trouble selecting both.

What control are you displaying them in?

htmlView, property innerHTML

I just tried a small test here. I created a new project with an HTMLview. I set the innerHTML:

    HTMLview1.innerHTML = "George Henne <img src='Alexandra.jpg'>"

I was able to select and copy the text and the image.

Does that work for you?