I created a prototype npm package that displays a popup for selected text on a website.
npm
www.npmjs.com
Source code
GitHub - nakamura196/text-popup
Contribute to nakamura196/text-popup development by creating an account on GitHub.
Demo page
Document
The following article was used as a reference for development.

npmライブラリを公開する(TypeScript、CDN対応)
You can try it by adding the following two lines to your website.
<script src="https://cdn.jsdelivr.net/npm/@nakamura196/text-popup/dist/main.min.js"></script>
<script>textPopup();</script>
I hope this is helpful as a reference for developing and publishing npm libraries.



Comments
…