Free Xojo Web Plugin: teccClipboard for Xojo Web 2

Another free Plugin. This time a bit of “clipboarding”, as much as is possible with all browsers having their own limitations and security concerns (for good and valid reasons):

4 Likes

Again, a big thanks to you!
There will be soon no longer reason to use the MBS plugins :wink:

1 Like

My pleasure. MBS doesn’t have Web 2 Plugins, do they? Plus, all paid Xojo Plugins I’m aware of are coming with great support. From me, you can only expect one thing: nothing :slight_smile: .

Seriously, with the exception of the teccCSS Plugin, all these plugins are things I need for my own projects, so why not share them?

3 Likes

No, you’re right. I told it anyway in case it begins one time.

Yes, my joke was not realistic :wink:

That’s nice.
Personally, it’s not I don’t want to share things, but my classes are mostly “cumbersome” and not easily shareable. At least, I share code when I can :slightly_smiling_face:

1 Like

Now you know why mine are encrypted :slight_smile:

1 Like

:grin:
Well done.

1 Like

This is usually the reaction I get whenever I have shared my code in the past

2 Likes

As long as it works, it is (almost) fine, isn’t it? :slight_smile:

Believe me, I have seen many “strange” code in business applications, including big brands. There are always different ways to achieve things. The only bad thing is having no exception handling at all etc. and security holes.

Funny enough when I looked for Javascripts for teccCookieConsent, I found many popular examples which looked good, but when I debugged them and tried them, they all had some challenges … Bugs are a fundamental part of the DNA of any programmer’s work. But if you are asking for money for your product, you should offer as well support, including to maintain access for older Xojo Versions etc, (that’s my understanding of good business ethics). As I don’t have time for that I’m offering my work for free. And as open-source sometimes means a lot of work too (if you take it seriously) … it is closed source for now. If Xojo will ever become open source I will open it as well - promised :slight_smile:

2 Likes

It seems that copying my text to the clipboard is a two step process ie click the button to add the text to the teccClipboard, then click the teccClipboard to add the text to the clipboard.

Is there any way to make this a one step process eg

teccClipboard3.value = tf7.Text
teccClipboard3.CopyToClipboard

Not at my knowledge if it should work on all browsers. Apple restriction for Safari in their Clipboard API.

BTW, this is exactly the reason why Xojo did not implement the Clipboard functionality … as all browsers behave a bit differently (it is actually kind of a mess), they concluded it is better not to implement it at all, what my plugin does: implementing it a bit Xojo => clipboard via click event.

For the teccClipboard Event to fire, you are required to click on the teccClipboard icon, and it is here that teccClipboard must do it’s invisible magic. So… is there any way you can add an option to Call that magic into being via code external to the teccClipboard? This way we could even hide the teccClipboard.

No. Not for Safari. It would only work for Chroma and FF, and I don’t implement features that will not work on all browsers. The Safari API (Javascript to Safari features) will block ALL requests (for security reasons), which are not triggered by a user clicking on “something”.

A few users were referring in this forum to https://clipboardjs.com/ and the magic it can’t do. That’s true on all codepen, fiddle examples etc, but won’t work in Safari if you don’t use an active click from user interaction. In other words: Safari will block any of such requests.

You can read more in this here for instance: New Safari clipboard API includes additional browser security, privacy mechanisms | The Daily Swig