Closed samant-rags closed 1 year ago
another example
https://gist.github.com/simon04/21ae8e3d07ec7f6b62ba5dcad403cc4a
@asimonok What do you think?
@samant-rags You can use tw-elements by loading it in After Render Code. The lib doesn't expose init method so there is only this way
const script = document.createElement('script');
script.src = 'https://cdn.jsdelivr.net/npm/tw-elements/dist/js/tw-elements.umd.min.js';
document.body.appendChild(script);
ES Modules is a great feature but it requires direct access to the html which can't be provided from panel options
@samant-rags You can use tw-elements by loading it in After Render Code. The lib doesn't expose init method so there is only this way
const script = document.createElement('script'); script.src = 'https://cdn.jsdelivr.net/npm/tw-elements/dist/js/tw-elements.umd.min.js'; document.body.appendChild(script);
ES Modules is a great feature but it requires direct access to the html which can't be provided from panel options
oh ok, this could have opened up options like https://huggingface.co/docs/transformers.js/tutorials/vanilla-js
@samant-rags That's a cool idea. Please share with us if you able to do it.
Also, we gladly accept a blog post with the Vanilla-JS implementation in Dynamic Text.
Sure Mikhail will come up with a blog ASAP and share .
On Sun, Nov 26, 2023 at 10:18 PM Mikhail Volkov @.***> wrote:
@samant-rags https://github.com/samant-rags That's a cool idea. Please share with us if you able to do it.
Also, we gladly accept a blog post with the Vanilla-JS implementation in Dynamic Text.
— Reply to this email directly, view it on GitHub https://github.com/VolkovLabs/volkovlabs-dynamictext-panel/issues/224#issuecomment-1826833032, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIDX3UYZZPUOZD3CTBU7KLYGNXHBAVCNFSM6AAAAAA6RJ6RMWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMRWHAZTGMBTGI . You are receiving this because you were mentioned.Message ID: @.***>
@samant-rags Great! We use Docusaurus with Markdown and PNG images.
You can open PR in https://github.com/VolkovLabs/volkovlabs.io or send us to format and publish when ready.
Wondering if we can get support for type="module" reason : https://tw-elements.com/docs/standard/components/accordion/
New components use js imports
// Initialization for ES Users import { Collapse, initTE, } from "tw-elements";
initTE({ Collapse });