read-only text fields in a repeater ?

Does anyone know if it’s possible to make a text field in a repeater read-only?

wixData.query(“1425MemberProfiles”)
.find()
.then((results) => {
$w(“#repeater1”).onItemReady(($item, itemData, index) => {
let m1Email = itemData.email;

	$item("#m1Email").text = m1Email; 

});

I know it works if using an input text field. But it is still selectable.

$item(“#m1Email”).value = m1Email;
$item(“#m1Email”).readonly = true;

I did quick fix for now - I put a clear box on top of the email field. So the user can see the email address but not copy it.

I would still love to know the proper way to make the email address not selectable.
Thanks for the help!

This can be easily hacked by accessing the data from the page source or by deleting the clear layer on top of it, unfortunately there’s not way it can be unselectable.

@1425club66601 @ahmadnasriya
Pretty interesting question.

In theory you can use some of a complicated ways like converting you text in svg path. In this case it can’t be copied by mouse selection.

You can try to create #image element in your repeater. Query texts from your collection. And use something like this service. Try to find it’s NPM on WIX or use API.
https://github.com/shrhdk/text-to-svg
Than convert each text to svg. And replace images with generated ones.

A bit complicated way. But interesting and should give you exactly what you want if success )

@vanyadoing Very Interesting Ahmad thanks for this answer.