Button to copy a portion of the web page to the users clipboard

Within Wappler is there a way to set up a button that would copy a portion of the web page to the users clipboard in JPEG format?

If yes, Is there any wappler documentation I can look at to understand how to do this?

I’m also interesting in generating BBCODE and sending it to the users clipboard via a button press - does anyone know if that is do-able in Wappler natively?

Thanks in advance for any help!!!

This is not possible with Wappler.

OK, thanks for letting me know Brad :slight_smile:

Why would you like to do this? What is the user case?

The users of my web site (my pizza pals) have asked me to include that function.

My web site is www.mypizzamaster.com

On the calculator page after a user inputs their dough recipe if they want to share it on the pizza forum with other members trying to learn - they would press a copy BBcode button and then they could re-post it.

It would generate something like this (not sure if it will format right in this message).

[table]
[tr]
[td] [/td][td]Grams[/td][td]Ounces[/td]
[/tr]
[tr]
[td]Flour (100%)[/td][td]309.970[/td][td]10.934[/td]
[/tr]
[tr]
[td]Water (60%)[/td][td]185.982[/td][td]6.560[/td]
[/tr]
[tr]
[td]Active Dry Yeast (0.5%)[/td][td]1.550[/td][td]0.055[/td]
[/tr]
[tr]
[td]Regular/Fine Sea Salt (2%)[/td][td]6.199[/td][td]0.219[/td]
[/tr]
[tr]
[td]Oil (2%)[/td][td]6.199[/td][td]0.219[/td]
[/tr]
[tr]
[td]Sugar (1%)[/td][td]3.100[/td][td]0.109[/td]
[/tr]
[tr]
[td]Total (165.5%, TF=0.09)[/td][td]513.000[/td][td]18.096[/td]
[/tr]
[tr]
[td]Single Ball[/td][td]513.000[/td][td]18.096[/td]
[/tr]
[tr]
[td][/td]
[/tr]
[/table]

Aha clear, well sure you can do that in Wappler :slight_smile: it is just a matter of an expression with a lot of text concatinations.

So for example you can make a texarea and a copy to bbcode button, that have a dynamic event on click that sets the text of the texarea to the whole table thing but with the calculated values inside.

Then the users can just copy the textarea and paste it to their forum.

Another challenge for @drymetal :slight_smile: to help you with

I’d be very curious to see it working. I just don’t see how it’s possible. :wink:

Hi Brad, you need to use dynamic attributes > value and mix static values with dynamic values.
Static values is the bbcode for table structure and dynamic values are the values from the input, just like:
'[td]Flour (100%)[/td][td]' + value1 + '[/td][td]' + value2 + '[/td]'
etc.

I get it in theory but I’d be very interested to see how the copy to clipboard works on pressing a button. It would , I think, still have to be copy and pasted using keyboard commands in the normal way?

I am very impressed with that pizza calculator as it is. Fine piece of work.

I was not referring to copy the content to clipboard, but just following George's suggestion:

1 Like

this works in Wappler

But getting it to grab just the area of interest on the page is a problem (I think).

Sure lots of possible solutions, I think you are only missing the select text line:

1 Like