I tried to actually create an extension for my app components, to be able to integrate trustcaptcha.
The only problem: It won't work, if I don't use the "dmx"-prefix.
Does that now literally mean I can forget about trying to somehow create an extension which allows me to integrate trustcaptcha myself into the UI of Wappler?
I want to create the template: <trustcaptcha-component></trustcaptcha-component>.
This will obviously create the element but it won't show up in the APP-Connect menu and it will also not allow me to use the properties I defined beforehand.
Yes. They are already installed.
The required packages for nodesjs are not the problem here though.
What I am trying to solve right now is the front-end.
Where one only has to insert the custom script they (trustcaptcha) created with the <script></script> element.
After that it is possible to just write <trustcaptcha-component></trustcaptcha-component> into the HTML-Page and the captcha test is created automatically and visualised on the page.
When you create a custom app connect extension you have two main files (components.hjson and a js file). Between those two files you can create css and js files to include on the Wappler page when you add the custom component. The dmx is necessary, but isn't related to the js and css files that you can include as part of the extension.
In the hjson I've set the type to: type: 'dmx-trustcaptcha-component'
Then I also set the template to: template: '<trustcaptcha-component id="@@id@@"></trustcaptcha-component>'. Because the JavaScript from Trustcaptcha trustcaptcha.js allows one to create this custom component already in the front end. My goal was it to insert the '<trustcaptcha-component id="@@id@@"></trustcaptcha-component>' now per App component.
But always, when I tried to insert it per App-connect, it shows up for exactly one second and then disappears from the app-connect menu.
It is succesfully being inserted into the DOM but I cannot use the properties on it I defined beforehand in the HJSON.
I obviously cannot do '<dmx-trustcaptcha-component id="@@id@@"></dmx-trustcaptcha-component>', becaue then, the element cannot be generated. The JavaScript from Trustcaptcha has it written that way, that only '<trustcaptcha-component id="@@id@@"></trustcaptcha-component>' generates the captcha test in the front end.
That's why my only solution right now is to download the javascript from trustcaptcha and change the trustcaptcha-component to dmx-trustcaptcha-component so I can be able to also modify the properties of this element through the APP-Connect menu.